home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 June: Reference Library / Dev.CD Jun 96 RL / Dev.CD Jun 96 RL.toast / Technical Documentation / develop / develop Issue 17 / develop Issue 17 code / Window Zooming.sea / Window Zooming / ZoomCode.c
MacBinary  |  1995-03-11  |  12.6 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
1% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Sat Mar 11 14:50:46 1995, modified Sat Mar 11 14:50:46 1995, creator 'MPS ', type ASCII, 12232 bytes "ZoomCode.c" magic text fragment for file(1) cmd, 1st line "#include <Types.h>", 2nd line "#include <Menus.h>", 3rd line "#include <Quickdraw.h>", 4th line "#include <Windows.h>", 5th line "", at 0x3048 456 bytes resource magic text fragment for file(1) cmd, 1st line "#include <Types.h>", 2nd line "#include <Menus.h>", 3rd line "#include <Quickdraw.h>", 4th line "#include <Windows.h>", 5th line "" default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% dearkID deark: macbinary default
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0a 5a 6f 6f 6d 43 6f | 64 65 2e 63 00 00 00 00 |..ZoomCo|de.c....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 2f c8 00 | 00 01 c8 ab 87 af 96 ab |...../..|........|
|00000060| 87 af 96 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 4c eb 00 00 |........|....L...|
|00000080| 23 69 6e 63 6c 75 64 65 | 20 3c 54 79 70 65 73 2e |#include| <Types.|
|00000090| 68 3e 0d 23 69 6e 63 6c | 75 64 65 20 3c 4d 65 6e |h>.#incl|ude <Men|
|000000a0| 75 73 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 20 3c |us.h>.#i|nclude <|
|000000b0| 51 75 69 63 6b 64 72 61 | 77 2e 68 3e 0d 23 69 6e |Quickdra|w.h>.#in|
|000000c0| 63 6c 75 64 65 20 3c 57 | 69 6e 64 6f 77 73 2e 68 |clude <W|indows.h|
|000000d0| 3e 0d 0d 2f 2a 0d 09 31 | 32 2f 30 37 2f 39 34 20 |>../*..1|2/07/94 |
|000000e0| 6d 6f 64 69 66 69 65 64 | 20 62 79 20 4a 61 6d 65 |modified| by Jame|
|000000f0| 73 20 45 2e 20 54 72 75 | 64 65 61 75 0d 09 4e 6f |s E. Tru|deau..No|
|00000100| 77 20 75 73 65 73 20 61 | 20 55 50 50 20 66 6f 72 |w uses a| UPP for|
|00000110| 20 63 61 6c 6c 20 74 6f | 20 44 65 76 69 63 65 4c | call to| DeviceL|
|00000120| 6f 6f 70 28 29 0d 2a 2f | 0d 0d 73 74 72 75 63 74 |oop().*/|..struct|
|00000130| 20 5a 6f 6f 6d 44 61 74 | 61 20 7b 0d 09 47 44 48 | ZoomDat|a {..GDH|
|00000140| 61 6e 64 6c 65 09 09 73 | 63 72 65 65 6e 57 69 74 |andle..s|creenWit|
|00000150| 68 4c 61 72 67 65 73 74 | 50 61 72 74 4f 66 57 69 |hLargest|PartOfWi|
|00000160| 6e 64 6f 77 3b 0d 09 75 | 6e 73 69 67 6e 65 64 20 |ndow;..u|nsigned |
|00000170| 6c 6f 6e 67 09 6c 61 72 | 67 65 73 74 41 72 65 61 |long.lar|gestArea|
|00000180| 3b 0d 09 52 65 63 74 09 | 09 09 77 69 6e 64 6f 77 |;..Rect.|..window|
|00000190| 42 6f 75 6e 64 73 3b 0d | 7d 3b 0d 74 79 70 65 64 |Bounds;.|};.typed|
|000001a0| 65 66 20 73 74 72 75 63 | 74 20 5a 6f 6f 6d 44 61 |ef struc|t ZoomDa|
|000001b0| 74 61 20 5a 6f 6f 6d 44 | 61 74 61 2c 20 2a 5a 6f |ta ZoomD|ata, *Zo|
|000001c0| 6f 6d 44 61 74 61 50 74 | 72 3b 0d 0d 74 79 70 65 |omDataPt|r;..type|
|000001d0| 64 65 66 20 76 6f 69 64 | 20 28 2a 43 61 6c 63 49 |def void| (*CalcI|
|000001e0| 64 65 61 6c 44 6f 63 75 | 6d 65 6e 74 53 69 7a 65 |dealDocu|mentSize|
|000001f0| 50 72 6f 63 50 74 72 29 | 28 57 69 6e 64 6f 77 50 |ProcPtr)|(WindowP|
|00000200| 74 72 20 74 68 65 57 69 | 6e 64 6f 77 2c 20 52 65 |tr theWi|ndow, Re|
|00000210| 63 74 20 2a 69 64 65 61 | 6c 43 6f 6e 74 65 6e 74 |ct *idea|lContent|
|00000220| 53 69 7a 65 29 3b 0d 0d | 65 6e 75 6d 20 7b 0d 09 |Size);..|enum {..|
|00000230| 6b 4e 75 64 67 65 53 6c | 6f 70 09 3d 09 34 2c 0d |kNudgeSl|op.=.4,.|
|00000240| 09 6b 49 63 6f 6e 53 70 | 61 63 65 09 3d 09 36 34 |.kIconSp|ace.=.64|
|00000250| 0d 7d 3b 0d 0d 76 6f 69 | 64 20 5a 6f 6f 6d 54 68 |.};..voi|d ZoomTh|
|00000260| 65 57 69 6e 64 6f 77 28 | 57 69 6e 64 6f 77 50 65 |eWindow(|WindowPe|
|00000270| 65 6b 20 74 68 65 57 69 | 6e 64 6f 77 2c 20 73 68 |ek theWi|ndow, sh|
|00000280| 6f 72 74 20 7a 6f 6f 6d | 53 74 61 74 65 2c 0d 09 |ort zoom|State,..|
|00000290| 09 09 09 09 43 61 6c 63 | 49 64 65 61 6c 44 6f 63 |....Calc|IdealDoc|
|000002a0| 75 6d 65 6e 74 53 69 7a | 65 50 72 6f 63 50 74 72 |umentSiz|eProcPtr|
|000002b0| 20 63 61 6c 63 52 6f 75 | 74 69 6e 65 29 3b 0d 70 | calcRou|tine);.p|
|000002c0| 61 73 63 61 6c 20 76 6f | 69 64 20 43 61 6c 63 57 |ascal vo|id CalcW|
|000002d0| 69 6e 64 6f 77 41 72 65 | 61 4f 6e 53 63 72 65 65 |indowAre|aOnScree|
|000002e0| 6e 28 73 68 6f 72 74 20 | 64 65 70 74 68 2c 20 73 |n(short |depth, s|
|000002f0| 68 6f 72 74 20 64 65 76 | 69 63 65 46 6c 61 67 73 |hort dev|iceFlags|
|00000300| 2c 20 47 44 48 61 6e 64 | 6c 65 20 74 61 72 67 65 |, GDHand|le targe|
|00000310| 74 44 65 76 69 63 65 2c | 0d 09 09 09 09 09 09 09 |tDevice,|........|
|00000320| 09 09 6c 6f 6e 67 20 75 | 73 65 72 44 61 74 61 29 |..long u|serData)|
|00000330| 3b 0d 73 68 6f 72 74 20 | 43 61 6c 63 75 6c 61 74 |;.short |Calculat|
|00000340| 65 4f 66 66 73 65 74 41 | 6d 6f 75 6e 74 28 73 68 |eOffsetA|mount(sh|
|00000350| 6f 72 74 20 69 64 65 61 | 6c 53 74 61 72 74 50 6f |ort idea|lStartPo|
|00000360| 69 6e 74 2c 20 73 68 6f | 72 74 20 69 64 65 61 6c |int, sho|rt ideal|
|00000370| 45 6e 64 50 6f 69 6e 74 | 2c 0d 09 09 09 09 09 09 |EndPoint|,.......|
|00000380| 09 73 68 6f 72 74 20 69 | 64 65 61 6c 4f 6e 53 63 |.short i|dealOnSc|
|00000390| 72 65 65 6e 53 74 61 72 | 74 50 6f 69 6e 74 2c 20 |reenStar|tPoint, |
|000003a0| 73 68 6f 72 74 20 69 64 | 65 61 6c 4f 6e 53 63 72 |short id|ealOnScr|
|000003b0| 65 65 6e 45 6e 64 50 6f | 69 6e 74 2c 0d 09 09 09 |eenEndPo|int,....|
|000003c0| 09 09 09 09 73 68 6f 72 | 74 20 73 63 72 65 65 6e |....shor|t screen|
|000003d0| 45 64 67 65 31 2c 20 73 | 68 6f 72 74 20 73 63 72 |Edge1, s|hort scr|
|000003e0| 65 65 6e 45 64 67 65 32 | 29 3b 0d 0d 73 74 61 74 |eenEdge2|);..stat|
|000003f0| 69 63 20 52 67 6e 48 61 | 6e 64 6c 65 20 47 65 74 |ic RgnHa|ndle Get|
|00000400| 57 69 6e 64 6f 77 43 6f | 6e 74 65 6e 74 52 65 67 |WindowCo|ntentReg|
|00000410| 69 6f 6e 28 57 69 6e 64 | 6f 77 50 65 65 6b 20 74 |ion(Wind|owPeek t|
|00000420| 68 65 57 69 6e 64 6f 77 | 29 3b 0d 73 74 61 74 69 |heWindow|);.stati|
|00000430| 63 20 52 67 6e 48 61 6e | 64 6c 65 20 47 65 74 57 |c RgnHan|dle GetW|
|00000440| 69 6e 64 6f 77 53 74 72 | 75 63 74 75 72 65 52 65 |indowStr|uctureRe|
|00000450| 67 69 6f 6e 28 57 69 6e | 64 6f 77 50 65 65 6b 20 |gion(Win|dowPeek |
|00000460| 74 68 65 57 69 6e 64 6f | 77 29 3b 0d 73 74 61 74 |theWindo|w);.stat|
|00000470| 69 63 20 76 6f 69 64 20 | 47 65 74 57 69 6e 64 6f |ic void |GetWindo|
|00000480| 77 50 6f 72 74 52 65 63 | 74 28 57 69 6e 64 6f 77 |wPortRec|t(Window|
|00000490| 50 65 65 6b 20 74 68 65 | 57 69 6e 64 6f 77 2c 20 |Peek the|Window, |
|000004a0| 52 65 63 74 20 2a 70 6f | 72 74 52 65 63 74 29 3b |Rect *po|rtRect);|
|000004b0| 0d 73 74 61 74 69 63 20 | 76 6f 69 64 20 53 65 74 |.static |void Set|
|000004c0| 57 69 6e 64 6f 77 53 74 | 61 6e 64 61 72 64 53 74 |WindowSt|andardSt|
|000004d0| 61 74 65 28 57 69 6e 64 | 6f 77 50 65 65 6b 20 74 |ate(Wind|owPeek t|
|000004e0| 68 65 57 69 6e 64 6f 77 | 2c 20 63 6f 6e 73 74 20 |heWindow|, const |
|000004f0| 52 65 63 74 20 2a 73 74 | 61 6e 64 61 72 64 53 74 |Rect *st|andardSt|
|00000500| 61 74 65 29 3b 0d 73 74 | 61 74 69 63 20 76 6f 69 |ate);.st|atic voi|
|00000510| 64 20 47 65 74 57 69 6e | 64 6f 77 55 73 65 72 53 |d GetWin|dowUserS|
|00000520| 74 61 74 65 28 57 69 6e | 64 6f 77 50 65 65 6b 20 |tate(Win|dowPeek |
|00000530| 74 68 65 57 69 6e 64 6f | 77 2c 20 52 65 63 74 20 |theWindo|w, Rect |
|00000540| 2a 75 73 65 72 53 74 61 | 74 65 29 3b 0d 0d 0d 76 |*userSta|te);...v|
|00000550| 6f 69 64 20 5a 6f 6f 6d | 54 68 65 57 69 6e 64 6f |oid Zoom|TheWindo|
|00000560| 77 28 57 69 6e 64 6f 77 | 50 65 65 6b 20 74 68 65 |w(Window|Peek the|
|00000570| 57 69 6e 64 6f 77 2c 20 | 73 68 6f 72 74 20 7a 6f |Window, |short zo|
|00000580| 6f 6d 53 74 61 74 65 2c | 0d 09 09 09 09 09 43 61 |omState,|......Ca|
|00000590| 6c 63 49 64 65 61 6c 44 | 6f 63 75 6d 65 6e 74 53 |lcIdealD|ocumentS|
|000005a0| 69 7a 65 50 72 6f 63 50 | 74 72 20 63 61 6c 63 52 |izeProcP|tr calcR|
|000005b0| 6f 75 74 69 6e 65 29 0d | 7b 0d 09 5a 6f 6f 6d 44 |outine).|{..ZoomD|
|000005c0| 61 74 61 09 7a 6f 6f 6d | 44 61 74 61 3b 0d 09 52 |ata.zoom|Data;..R|
|000005d0| 65 63 74 09 09 6e 65 77 | 53 74 61 6e 64 61 72 64 |ect..new|Standard|
|000005e0| 52 65 63 74 3b 0d 09 52 | 65 63 74 09 09 73 63 72 |Rect;..R|ect..scr|
|000005f0| 61 74 63 68 52 65 63 74 | 3b 0d 09 52 65 63 74 09 |atchRect|;..Rect.|
|00000600| 09 73 63 72 65 65 6e 52 | 65 63 74 3b 0d 09 52 65 |.screenR|ect;..Re|
|00000610| 63 74 09 09 70 6f 72 74 | 52 65 63 74 3b 0d 09 52 |ct..port|Rect;..R|
|00000620| 65 63 74 09 09 63 6f 6e | 74 65 6e 74 52 65 67 69 |ect..con|tentRegi|
|00000630| 6f 6e 42 6f 75 6e 64 69 | 6e 67 42 6f 78 3b 0d 09 |onBoundi|ngBox;..|
|00000640| 52 65 63 74 09 09 73 74 | 72 75 63 74 75 72 65 52 |Rect..st|ructureR|
|00000650| 65 67 69 6f 6e 42 6f 75 | 6e 64 69 6e 67 42 6f 78 |egionBou|ndingBox|
|00000660| 3b 0d 09 52 65 63 74 09 | 09 64 65 76 69 63 65 4c |;..Rect.|.deviceL|
|00000670| 6f 6f 70 52 65 63 74 3b | 0d 09 47 72 61 66 50 74 |oopRect;|..GrafPt|
|00000680| 72 09 09 63 75 72 72 65 | 6e 74 50 6f 72 74 3b 0d |r..curre|ntPort;.|
|00000690| 09 52 67 6e 48 61 6e 64 | 6c 65 09 73 63 72 61 74 |.RgnHand|le.scrat|
|000006a0| 63 68 52 65 67 69 6f 6e | 3b 0d 09 52 67 6e 48 61 |chRegion|;..RgnHa|
|000006b0| 6e 64 6c 65 09 63 6f 6e | 74 65 6e 74 52 65 67 69 |ndle.con|tentRegi|
|000006c0| 6f 6e 3b 0d 09 52 67 6e | 48 61 6e 64 6c 65 09 73 |on;..Rgn|Handle.s|
|000006d0| 74 72 75 63 74 75 72 65 | 52 65 67 69 6f 6e 3b 0d |tructure|Region;.|
|000006e0| 09 47 44 48 61 6e 64 6c | 65 09 6d 61 69 6e 44 65 |.GDHandl|e.mainDe|
|000006f0| 76 69 63 65 3b 0d 09 73 | 68 6f 72 74 09 09 68 6f |vice;..s|hort..ho|
|00000700| 72 69 7a 6f 6e 74 61 6c | 41 6d 6f 75 6e 74 4f 66 |rizontal|AmountOf|
|00000710| 66 53 63 72 65 65 6e 3b | 0d 09 73 68 6f 72 74 09 |fScreen;|..short.|
|00000720| 09 76 65 72 74 69 63 61 | 6c 41 6d 6f 75 6e 74 4f |.vertica|lAmountO|
|00000730| 66 66 53 63 72 65 65 6e | 3b 0d 09 73 68 6f 72 74 |ffScreen|;..short|
|00000740| 09 09 77 69 6e 64 6f 77 | 46 72 61 6d 65 54 6f 70 |..window|FrameTop|
|00000750| 53 69 7a 65 3b 0d 09 73 | 68 6f 72 74 09 09 77 69 |Size;..s|hort..wi|
|00000760| 6e 64 6f 77 46 72 61 6d | 65 4c 65 66 74 53 69 7a |ndowFram|eLeftSiz|
|00000770| 65 3b 0d 09 73 68 6f 72 | 74 09 09 77 69 6e 64 6f |e;..shor|t..windo|
|00000780| 77 46 72 61 6d 65 52 69 | 67 68 74 53 69 7a 65 3b |wFrameRi|ghtSize;|
|00000790| 0d 09 73 68 6f 72 74 09 | 09 77 69 6e 64 6f 77 46 |..short.|.windowF|
|000007a0| 72 61 6d 65 42 6f 74 74 | 6f 6d 53 69 7a 65 3b 0d |rameBott|omSize;.|
|000007b0| 09 0d 0d 09 47 65 74 50 | 6f 72 74 28 26 63 75 72 |....GetP|ort(&cur|
|000007c0| 72 65 6e 74 50 6f 72 74 | 29 3b 0d 09 53 65 74 50 |rentPort|);..SetP|
|000007d0| 6f 72 74 28 28 57 69 6e | 64 6f 77 50 74 72 29 20 |ort((Win|dowPtr) |
|000007e0| 74 68 65 57 69 6e 64 6f | 77 29 3b 0d 09 63 6f 6e |theWindo|w);..con|
|000007f0| 74 65 6e 74 52 65 67 69 | 6f 6e 20 3d 20 47 65 74 |tentRegi|on = Get|
|00000800| 57 69 6e 64 6f 77 43 6f | 6e 74 65 6e 74 52 65 67 |WindowCo|ntentReg|
|00000810| 69 6f 6e 28 74 68 65 57 | 69 6e 64 6f 77 29 3b 0d |ion(theW|indow);.|
|00000820| 09 73 74 72 75 63 74 75 | 72 65 52 65 67 69 6f 6e |.structu|reRegion|
|00000830| 20 3d 20 47 65 74 57 69 | 6e 64 6f 77 53 74 72 75 | = GetWi|ndowStru|
|00000840| 63 74 75 72 65 52 65 67 | 69 6f 6e 28 74 68 65 57 |ctureReg|ion(theW|
|00000850| 69 6e 64 6f 77 29 3b 0d | 09 47 65 74 57 69 6e 64 |indow);.|.GetWind|
|00000860| 6f 77 50 6f 72 74 52 65 | 63 74 28 74 68 65 57 69 |owPortRe|ct(theWi|
|00000870| 6e 64 6f 77 2c 20 26 70 | 6f 72 74 52 65 63 74 29 |ndow, &p|ortRect)|
|00000880| 3b 0d 09 63 6f 6e 74 65 | 6e 74 52 65 67 69 6f 6e |;..conte|ntRegion|
|00000890| 42 6f 75 6e 64 69 6e 67 | 42 6f 78 20 3d 20 28 2a |Bounding|Box = (*|
|000008a0| 2a 63 6f 6e 74 65 6e 74 | 52 65 67 69 6f 6e 29 2e |*content|Region).|
|000008b0| 72 67 6e 42 42 6f 78 3b | 0d 09 73 74 72 75 63 74 |rgnBBox;|..struct|
|000008c0| 75 72 65 52 65 67 69 6f | 6e 42 6f 75 6e 64 69 6e |ureRegio|nBoundin|
|000008d0| 67 42 6f 78 20 3d 20 28 | 2a 2a 73 74 72 75 63 74 |gBox = (|**struct|
|000008e0| 75 72 65 52 65 67 69 6f | 6e 29 2e 72 67 6e 42 42 |ureRegio|n).rgnBB|
|000008f0| 6f 78 3b 0d 09 0d 09 2f | 2f 20 44 65 74 65 72 6d |ox;..../|/ Determ|
|00000900| 69 6e 65 20 74 68 65 20 | 73 69 7a 65 20 6f 66 20 |ine the |size of |
|00000910| 74 68 65 20 77 69 6e 64 | 6f 77 20 66 72 61 6d 65 |the wind|ow frame|
|00000920| 0d 09 77 69 6e 64 6f 77 | 46 72 61 6d 65 54 6f 70 |..window|FrameTop|
|00000930| 53 69 7a 65 20 3d 20 63 | 6f 6e 74 65 6e 74 52 65 |Size = c|ontentRe|
|00000940| 67 69 6f 6e 42 6f 75 6e | 64 69 6e 67 42 6f 78 2e |gionBoun|dingBox.|
|00000950| 74 6f 70 20 2d 20 0d 09 | 09 09 09 09 09 09 09 09 |top - ..|........|
|00000960| 73 74 72 75 63 74 75 72 | 65 52 65 67 69 6f 6e 42 |structur|eRegionB|
|00000970| 6f 75 6e 64 69 6e 67 42 | 6f 78 2e 74 6f 70 3b 0d |oundingB|ox.top;.|
|00000980| 09 77 69 6e 64 6f 77 46 | 72 61 6d 65 4c 65 66 74 |.windowF|rameLeft|
|00000990| 53 69 7a 65 20 3d 20 63 | 6f 6e 74 65 6e 74 52 65 |Size = c|ontentRe|
|000009a0| 67 69 6f 6e 42 6f 75 6e | 64 69 6e 67 42 6f 78 2e |gionBoun|dingBox.|
|000009b0| 6c 65 66 74 20 2d 20 0d | 09 09 09 09 09 09 09 09 |left - .|........|
|000009c0| 09 73 74 72 75 63 74 75 | 72 65 52 65 67 69 6f 6e |.structu|reRegion|
|000009d0| 42 6f 75 6e 64 69 6e 67 | 42 6f 78 2e 6c 65 66 74 |Bounding|Box.left|
|000009e0| 3b 0d 09 77 69 6e 64 6f | 77 46 72 61 6d 65 52 69 |;..windo|wFrameRi|
|000009f0| 67 68 74 53 69 7a 65 20 | 3d 20 73 74 72 75 63 74 |ghtSize |= struct|
|00000a00| 75 72 65 52 65 67 69 6f | 6e 42 6f 75 6e 64 69 6e |ureRegio|nBoundin|
|00000a10| 67 42 6f 78 2e 72 69 67 | 68 74 20 2d 20 0d 09 09 |gBox.rig|ht - ...|
|00000a20| 09 09 09 09 09 09 09 63 | 6f 6e 74 65 6e 74 52 65 |.......c|ontentRe|
|00000a30| 67 69 6f 6e 42 6f 75 6e | 64 69 6e 67 42 6f 78 2e |gionBoun|dingBox.|
|00000a40| 72 69 67 68 74 3b 0d 09 | 77 69 6e 64 6f 77 46 72 |right;..|windowFr|
|00000a50| 61 6d 65 42 6f 74 74 6f | 6d 53 69 7a 65 20 3d 20 |ameBotto|mSize = |
|00000a60| 73 74 72 75 63 74 75 72 | 65 52 65 67 69 6f 6e 42 |structur|eRegionB|
|00000a70| 6f 75 6e 64 69 6e 67 42 | 6f 78 2e 62 6f 74 74 6f |oundingB|ox.botto|
|00000a80| 6d 20 2d 20 0d 09 09 09 | 09 09 09 09 09 09 63 6f |m - ....|......co|
|00000a90| 6e 74 65 6e 74 52 65 67 | 69 6f 6e 42 6f 75 6e 64 |ntentReg|ionBound|
|00000aa0| 69 6e 67 42 6f 78 2e 62 | 6f 74 74 6f 6d 3b 0d 09 |ingBox.b|ottom;..|
|00000ab0| 09 09 09 09 09 09 09 09 | 0d 09 2f 2f 20 49 66 20 |........|..// If |
|00000ac0| 74 68 65 20 77 69 6e 64 | 6f 77 20 69 73 20 62 65 |the wind|ow is be|
|00000ad0| 69 6e 67 20 7a 6f 6f 6d | 65 64 20 69 6e 74 6f 20 |ing zoom|ed into |
|00000ae0| 74 68 65 20 73 74 61 6e | 64 61 72 64 20 73 74 61 |the stan|dard sta|
|00000af0| 74 65 2c 20 63 61 6c 63 | 75 6c 61 74 65 20 74 68 |te, calc|ulate th|
|00000b00| 65 20 62 65 73 74 20 73 | 69 7a 65 0d 09 2f 2f 20 |e best s|ize..// |
|00000b10| 74 6f 20 64 69 73 70 6c | 61 79 20 74 68 65 20 77 |to displ|ay the w|
|00000b20| 69 6e 64 6f 77 d5 73 20 | 69 6e 66 6f 72 6d 61 74 |indow.s |informat|
|00000b30| 69 6f 6e 2e 0d 09 6d 61 | 69 6e 44 65 76 69 63 65 |ion...ma|inDevice|
|00000b40| 20 3d 20 47 65 74 4d 61 | 69 6e 44 65 76 69 63 65 | = GetMa|inDevice|
|00000b50| 28 29 3b 0d 09 69 66 20 | 28 7a 6f 6f 6d 53 74 61 |();..if |(zoomSta|
|00000b60| 74 65 20 3d 3d 20 69 6e | 5a 6f 6f 6d 4f 75 74 29 |te == in|ZoomOut)|
|00000b70| 20 7b 0d 09 09 7a 6f 6f | 6d 44 61 74 61 2e 73 63 | {...zoo|mData.sc|
|00000b80| 72 65 65 6e 57 69 74 68 | 4c 61 72 67 65 73 74 50 |reenWith|LargestP|
|00000b90| 61 72 74 4f 66 57 69 6e | 64 6f 77 20 3d 20 6d 61 |artOfWin|dow = ma|
|00000ba0| 69 6e 44 65 76 69 63 65 | 3b 0d 09 09 7a 6f 6f 6d |inDevice|;...zoom|
|00000bb0| 44 61 74 61 2e 6c 61 72 | 67 65 73 74 41 72 65 61 |Data.lar|gestArea|
|00000bc0| 20 3d 20 30 3b 0d 09 0d | 09 09 2f 2f 20 55 73 75 | = 0;...|..// Usu|
|00000bd0| 61 6c 6c 79 2c 20 77 65 | 20 77 6f 75 6c 64 20 75 |ally, we| would u|
|00000be0| 73 65 20 74 68 65 20 63 | 6f 6e 74 65 6e 74 20 72 |se the c|ontent r|
|00000bf0| 65 67 69 6f 6e d5 73 20 | 62 6f 75 6e 64 69 6e 67 |egion.s |bounding|
|00000c00| 20 62 6f 78 20 74 6f 20 | 64 65 74 65 72 6d 69 6e | box to |determin|
|00000c10| 65 20 74 68 65 20 6d 6f | 6e 69 74 6f 72 0d 09 09 |e the mo|nitor...|
|00000c20| 2f 2f 20 77 69 74 68 20 | 6c 61 72 67 65 73 74 20 |// with |largest |
|00000c30| 70 6f 72 74 69 6f 6e 20 | 6f 66 20 74 68 65 20 77 |portion |of the w|
|00000c40| 69 6e 64 6f 77 d5 73 20 | 61 72 65 61 2e 20 48 6f |indow.s |area. Ho|
|00000c50| 77 65 76 65 72 2c 20 69 | 66 20 74 68 65 20 65 6e |wever, i|f the en|
|00000c60| 74 69 72 65 20 63 6f 6e | 74 65 6e 74 20 72 65 67 |tire con|tent reg|
|00000c70| 69 6f 6e 0d 09 09 2f 2f | 20 6f 66 20 74 68 65 20 |ion...//| of the |
|00000c80| 77 69 6e 64 6f 77 20 69 | 73 20 6e 6f 74 20 6f 6e |window i|s not on|
|00000c90| 20 61 6e 79 20 73 63 72 | 65 65 6e 2c 20 74 68 65 | any scr|een, the|
|00000ca0| 20 73 74 72 75 63 74 75 | 72 65 20 72 65 67 69 6f | structu|re regio|
|00000cb0| 6e 20 73 68 6f 75 6c 64 | 20 62 65 20 75 73 65 64 |n should| be used|
|00000cc0| 20 69 6e 73 74 65 61 64 | 2e 0d 09 09 73 63 72 61 | instead|....scra|
|00000cd0| 74 63 68 52 65 67 69 6f | 6e 20 3d 20 4e 65 77 52 |tchRegio|n = NewR|
|00000ce0| 67 6e 28 29 3b 0d 09 09 | 53 65 63 74 52 67 6e 28 |gn();...|SectRgn(|
|00000cf0| 47 65 74 47 72 61 79 52 | 67 6e 28 29 2c 20 63 6f |GetGrayR|gn(), co|
|00000d00| 6e 74 65 6e 74 52 65 67 | 69 6f 6e 2c 20 73 63 72 |ntentReg|ion, scr|
|00000d10| 61 74 63 68 52 65 67 69 | 6f 6e 29 3b 0d 09 09 69 |atchRegi|on);...i|
|00000d20| 66 20 28 45 6d 70 74 79 | 52 67 6e 28 73 63 72 61 |f (Empty|Rgn(scra|
|00000d30| 74 63 68 52 65 67 69 6f | 6e 29 29 0d 09 09 09 7a |tchRegio|n))....z|
|00000d40| 6f 6f 6d 44 61 74 61 2e | 77 69 6e 64 6f 77 42 6f |oomData.|windowBo|
|00000d50| 75 6e 64 73 20 3d 20 73 | 74 72 75 63 74 75 72 65 |unds = s|tructure|
|00000d60| 52 65 67 69 6f 6e 42 6f | 75 6e 64 69 6e 67 42 6f |RegionBo|undingBo|
|00000d70| 78 3b 0d 09 09 65 6c 73 | 65 0d 09 09 09 7a 6f 6f |x;...els|e....zoo|
|00000d80| 6d 44 61 74 61 2e 77 69 | 6e 64 6f 77 42 6f 75 6e |mData.wi|ndowBoun|
|00000d90| 64 73 20 3d 20 63 6f 6e | 74 65 6e 74 52 65 67 69 |ds = con|tentRegi|
|00000da0| 6f 6e 42 6f 75 6e 64 69 | 6e 67 42 6f 78 3b 0d 09 |onBoundi|ngBox;..|
|00000db0| 0d 09 09 2f 2f 20 55 73 | 65 20 44 65 76 69 63 65 |...// Us|e Device|
|00000dc0| 4c 6f 6f 70 20 74 6f 20 | 77 61 6c 6b 20 74 68 72 |Loop to |walk thr|
|00000dd0| 6f 75 67 68 20 61 6c 6c | 20 74 68 65 20 61 63 74 |ough all| the act|
|00000de0| 69 76 65 20 73 63 72 65 | 65 6e 73 20 74 6f 20 66 |ive scre|ens to f|
|00000df0| 69 6e 64 20 74 68 65 20 | 6f 6e 65 20 77 69 74 68 |ind the |one with|
|00000e00| 20 74 68 65 0d 09 09 2f | 2f 20 6c 61 72 67 65 73 | the.../|/ larges|
|00000e10| 74 20 70 6f 72 74 69 6f | 6e 20 6f 66 20 74 68 65 |t portio|n of the|
|00000e20| 20 7a 6f 6f 6d 65 64 20 | 77 69 6e 64 6f 77 0d 09 | zoomed |window..|
|00000e30| 09 64 65 76 69 63 65 4c | 6f 6f 70 52 65 63 74 20 |.deviceL|oopRect |
|00000e40| 3d 20 7a 6f 6f 6d 44 61 | 74 61 2e 77 69 6e 64 6f |= zoomDa|ta.windo|
|00000e50| 77 42 6f 75 6e 64 73 3b | 0d 09 09 47 6c 6f 62 61 |wBounds;|...Globa|
|00000e60| 6c 54 6f 4c 6f 63 61 6c | 28 28 50 6f 69 6e 74 20 |lToLocal|((Point |
|00000e70| 2a 29 26 64 65 76 69 63 | 65 4c 6f 6f 70 52 65 63 |*)&devic|eLoopRec|
|00000e80| 74 29 3b 0d 09 09 47 6c | 6f 62 61 6c 54 6f 4c 6f |t);...Gl|obalToLo|
|00000e90| 63 61 6c 28 28 50 6f 69 | 6e 74 20 2a 29 26 64 65 |cal((Poi|nt *)&de|
|00000ea0| 76 69 63 65 4c 6f 6f 70 | 52 65 63 74 2e 62 6f 74 |viceLoop|Rect.bot|
|00000eb0| 74 6f 6d 29 3b 0d 09 09 | 52 65 63 74 52 67 6e 28 |tom);...|RectRgn(|
|00000ec0| 73 63 72 61 74 63 68 52 | 65 67 69 6f 6e 2c 20 26 |scratchR|egion, &|
|00000ed0| 64 65 76 69 63 65 4c 6f | 6f 70 52 65 63 74 29 3b |deviceLo|opRect);|
|00000ee0| 0d 0d 2f 2a 20 6a 74 20 | 31 32 2f 37 2f 39 34 20 |../* jt |12/7/94 |
|00000ef0| 66 6f 72 20 50 50 43 2c | 20 72 65 70 6c 61 63 65 |for PPC,| replace|
|00000f00| 20 6f 72 69 67 69 6e 61 | 6c 20 63 61 6c 6c 20 74 | origina|l call t|
|00000f10| 6f 20 44 65 76 69 63 65 | 4c 6f 6f 70 20 74 6f 20 |o Device|Loop to |
|00000f20| 75 73 65 20 55 50 50 20 | 20 2a 2f 0d 2f 2a 09 09 |use UPP | */./*..|
|00000f30| 44 65 76 69 63 65 4c 6f | 6f 70 28 73 63 72 61 74 |DeviceLo|op(scrat|
|00000f40| 63 68 52 65 67 69 6f 6e | 2c 20 26 43 61 6c 63 57 |chRegion|, &CalcW|
|00000f50| 69 6e 64 6f 77 41 72 65 | 61 4f 6e 53 63 72 65 65 |indowAre|aOnScree|
|00000f60| 6e 2c 20 28 6c 6f 6e 67 | 29 20 26 7a 6f 6f 6d 44 |n, (long|) &zoomD|
|00000f70| 61 74 61 2c 20 2a 2f 0d | 2f 2a 09 09 09 09 09 28 |ata, */.|/*.....(|
|00000f80| 44 65 76 69 63 65 4c 6f | 6f 70 46 6c 61 67 73 29 |DeviceLo|opFlags)|
|00000f90| 20 73 69 6e 67 6c 65 44 | 65 76 69 63 65 73 29 3b | singleD|evices);|
|00000fa0| 20 2a 2f 0d 0d 09 09 7b | 0d 09 09 09 44 65 76 69 | */....{|....Devi|
|00000fb0| 63 65 4c 6f 6f 70 44 72 | 61 77 69 6e 67 55 50 50 |ceLoopDr|awingUPP|
|00000fc0| 20 6d 79 55 50 50 20 3d | 20 20 4e 65 77 44 65 76 | myUPP =| NewDev|
|00000fd0| 69 63 65 4c 6f 6f 70 44 | 72 61 77 69 6e 67 50 72 |iceLoopD|rawingPr|
|00000fe0| 6f 63 28 43 61 6c 63 57 | 69 6e 64 6f 77 41 72 65 |oc(CalcW|indowAre|
|00000ff0| 61 4f 6e 53 63 72 65 65 | 6e 29 3b 0d 09 0d 09 09 |aOnScree|n);.....|
|00001000| 09 44 65 76 69 63 65 4c | 6f 6f 70 28 73 63 72 61 |.DeviceL|oop(scra|
|00001010| 74 63 68 52 65 67 69 6f | 6e 2c 20 26 43 61 6c 63 |tchRegio|n, &Calc|
|00001020| 57 69 6e 64 6f 77 41 72 | 65 61 4f 6e 53 63 72 65 |WindowAr|eaOnScre|
|00001030| 65 6e 2c 20 28 6c 6f 6e | 67 29 20 26 7a 6f 6f 6d |en, (lon|g) &zoom|
|00001040| 44 61 74 61 2c 0d 09 09 | 09 09 09 28 44 65 76 69 |Data,...|...(Devi|
|00001050| 63 65 4c 6f 6f 70 46 6c | 61 67 73 29 20 73 69 6e |ceLoopFl|ags) sin|
|00001060| 67 6c 65 44 65 76 69 63 | 65 73 29 3b 0d 09 09 09 |gleDevic|es);....|
|00001070| 09 09 0d 09 09 09 44 69 | 73 70 6f 73 65 52 6f 75 |......Di|sposeRou|
|00001080| 74 69 6e 65 44 65 73 63 | 72 69 70 74 6f 72 28 6d |tineDesc|riptor(m|
|00001090| 79 55 50 50 29 3b 0d 09 | 09 7d 0d 0d 0d 09 09 44 |yUPP);..|.}.....D|
|000010a0| 69 73 70 6f 73 65 52 67 | 6e 28 73 63 72 61 74 63 |isposeRg|n(scratc|
|000010b0| 68 52 65 67 69 6f 6e 29 | 3b 0d 09 09 73 63 72 65 |hRegion)|;...scre|
|000010c0| 65 6e 52 65 63 74 20 3d | 20 28 2a 2a 28 7a 6f 6f |enRect =| (**(zoo|
|000010d0| 6d 44 61 74 61 2e 73 63 | 72 65 65 6e 57 69 74 68 |mData.sc|reenWith|
|000010e0| 4c 61 72 67 65 73 74 50 | 61 72 74 4f 66 57 69 6e |LargestP|artOfWin|
|000010f0| 64 6f 77 29 29 2e 67 64 | 52 65 63 74 3b 0d 09 09 |dow)).gd|Rect;...|
|00001100| 0d 09 09 2f 2f 20 49 66 | 20 74 68 65 20 6d 6f 6e |...// If| the mon|
|00001110| 69 74 6f 72 20 62 65 69 | 6e 67 20 7a 6f 6f 6d 65 |itor bei|ng zoome|
|00001120| 64 20 74 6f 20 69 73 20 | 74 68 65 20 6d 61 69 6e |d to is |the main|
|00001130| 20 6d 6f 6e 69 74 6f 72 | 2c 20 63 68 61 6e 67 65 | monitor|, change|
|00001140| 20 74 68 65 20 74 6f 70 | 20 6f 66 20 74 68 65 0d | the top| of the.|
|00001150| 09 09 2f 2f 20 75 73 65 | 61 62 6c 65 20 73 63 72 |..// use|able scr|
|00001160| 65 65 6e 20 61 72 65 61 | 20 74 6f 20 61 76 6f 69 |een area| to avoi|
|00001170| 64 20 70 75 74 74 69 6e | 67 20 74 68 65 20 74 69 |d puttin|g the ti|
|00001180| 74 6c 65 20 62 61 72 20 | 75 6e 64 65 72 6e 65 61 |tle bar |undernea|
|00001190| 74 68 20 74 68 65 20 6d | 65 6e 75 62 61 72 2e 0d |th the m|enubar..|
|000011a0| 09 09 69 66 20 28 7a 6f | 6f 6d 44 61 74 61 2e 73 |..if (zo|omData.s|
|000011b0| 63 72 65 65 6e 57 69 74 | 68 4c 61 72 67 65 73 74 |creenWit|hLargest|
|000011c0| 50 61 72 74 4f 66 57 69 | 6e 64 6f 77 20 3d 3d 20 |PartOfWi|ndow == |
|000011d0| 6d 61 69 6e 44 65 76 69 | 63 65 29 0d 09 09 09 73 |mainDevi|ce)....s|
|000011e0| 63 72 65 65 6e 52 65 63 | 74 2e 74 6f 70 20 2b 3d |creenRec|t.top +=|
|000011f0| 20 47 65 74 4d 42 61 72 | 48 65 69 67 68 74 28 29 | GetMBar|Height()|
|00001200| 3b 0d 09 09 09 0d 09 09 | 2f 2f 20 47 6f 20 66 69 |;.......|// Go fi|
|00001210| 67 75 72 65 20 6f 75 74 | 20 74 68 65 20 70 65 72 |gure out| the per|
|00001220| 66 65 63 74 20 73 69 7a | 65 20 66 6f 72 20 74 68 |fect siz|e for th|
|00001230| 65 20 77 69 6e 64 6f 77 | 20 61 73 20 69 66 20 77 |e window| as if w|
|00001240| 65 20 68 61 64 20 61 6e | 20 69 6e 66 69 6e 69 74 |e had an| infinit|
|00001250| 65 6c 79 20 6c 61 72 67 | 65 0d 09 09 2f 2f 20 73 |ely larg|e...// s|
|00001260| 63 72 65 65 6e 0d 09 09 | 28 2a 63 61 6c 63 52 6f |creen...|(*calcRo|
|00001270| 75 74 69 6e 65 29 28 28 | 57 69 6e 64 6f 77 50 74 |utine)((|WindowPt|
|00001280| 72 29 20 74 68 65 57 69 | 6e 64 6f 77 2c 20 26 6e |r) theWi|ndow, &n|
|00001290| 65 77 53 74 61 6e 64 61 | 72 64 52 65 63 74 29 3b |ewStanda|rdRect);|
|000012a0| 0d 09 09 0d 09 09 2f 2f | 20 41 6e 63 68 6f 72 20 |......//| Anchor |
|000012b0| 74 68 65 20 6e 65 77 20 | 72 65 63 74 61 6e 67 6c |the new |rectangl|
|000012c0| 65 20 61 74 20 74 68 65 | 20 77 69 6e 64 6f 77 d5 |e at the| window.|
|000012d0| 73 20 63 75 72 72 65 6e | 74 20 74 6f 70 20 6c 65 |s curren|t top le|
|000012e0| 66 74 20 63 6f 72 6e 65 | 72 0d 09 09 4f 66 66 73 |ft corne|r...Offs|
|000012f0| 65 74 52 65 63 74 28 26 | 6e 65 77 53 74 61 6e 64 |etRect(&|newStand|
|00001300| 61 72 64 52 65 63 74 2c | 20 2d 6e 65 77 53 74 61 |ardRect,| -newSta|
|00001310| 6e 64 61 72 64 52 65 63 | 74 2e 6c 65 66 74 2c 20 |ndardRec|t.left, |
|00001320| 2d 6e 65 77 53 74 61 6e | 64 61 72 64 52 65 63 74 |-newStan|dardRect|
|00001330| 2e 74 6f 70 29 3b 0d 09 | 09 4f 66 66 73 65 74 52 |.top);..|.OffsetR|
|00001340| 65 63 74 28 26 6e 65 77 | 53 74 61 6e 64 61 72 64 |ect(&new|Standard|
|00001350| 52 65 63 74 2c 20 63 6f | 6e 74 65 6e 74 52 65 67 |Rect, co|ntentReg|
|00001360| 69 6f 6e 42 6f 75 6e 64 | 69 6e 67 42 6f 78 2e 6c |ionBound|ingBox.l|
|00001370| 65 66 74 2c 0d 09 09 09 | 09 09 63 6f 6e 74 65 6e |eft,....|..conten|
|00001380| 74 52 65 67 69 6f 6e 42 | 6f 75 6e 64 69 6e 67 42 |tRegionB|oundingB|
|00001390| 6f 78 2e 74 6f 70 29 3b | 0d 09 09 0d 09 09 2f 2f |ox.top);|......//|
|000013a0| 20 6e 65 77 53 74 61 6e | 64 61 72 64 52 65 63 74 | newStan|dardRect|
|000013b0| 20 69 73 20 74 68 65 20 | 69 64 65 61 6c 20 73 69 | is the |ideal si|
|000013c0| 7a 65 20 66 6f 72 20 74 | 68 65 20 63 6f 6e 74 65 |ze for t|he conte|
|000013d0| 6e 74 20 61 72 65 61 2e | 20 54 68 65 20 77 69 6e |nt area.| The win|
|000013e0| 64 6f 77 20 66 72 61 6d | 65 0d 09 09 2f 2f 20 6e |dow fram|e...// n|
|000013f0| 65 65 64 73 20 74 6f 20 | 62 65 20 61 63 63 6f 75 |eeds to |be accou|
|00001400| 6e 74 65 64 20 66 6f 72 | 20 77 68 65 6e 20 77 65 |nted for| when we|
|00001410| 20 73 65 65 20 69 66 20 | 74 68 65 20 77 69 6e 64 | see if |the wind|
|00001420| 6f 77 20 6e 65 65 64 73 | 20 74 6f 20 62 65 20 6d |ow needs| to be m|
|00001430| 6f 76 65 64 2c 0d 09 09 | 2f 2f 20 6f 72 20 72 65 |oved,...|// or re|
|00001440| 73 69 7a 65 64 2c 20 73 | 6f 20 61 64 64 20 69 6e |sized, s|o add in|
|00001450| 20 74 68 65 20 64 69 6d | 65 6e 73 69 6f 6e 73 20 | the dim|ensions |
|00001460| 6f 66 20 74 68 65 20 77 | 69 6e 64 6f 77 20 66 72 |of the w|indow fr|
|00001470| 61 6d 65 2e 0d 09 09 6e | 65 77 53 74 61 6e 64 61 |ame....n|ewStanda|
|00001480| 72 64 52 65 63 74 2e 74 | 6f 70 20 2d 3d 20 77 69 |rdRect.t|op -= wi|
|00001490| 6e 64 6f 77 46 72 61 6d | 65 54 6f 70 53 69 7a 65 |ndowFram|eTopSize|
|000014a0| 3b 0d 09 09 6e 65 77 53 | 74 61 6e 64 61 72 64 52 |;...newS|tandardR|
|000014b0| 65 63 74 2e 6c 65 66 74 | 20 2d 3d 20 77 69 6e 64 |ect.left| -= wind|
|000014c0| 6f 77 46 72 61 6d 65 4c | 65 66 74 53 69 7a 65 3b |owFrameL|eftSize;|
|000014d0| 0d 09 09 6e 65 77 53 74 | 61 6e 64 61 72 64 52 65 |...newSt|andardRe|
|000014e0| 63 74 2e 72 69 67 68 74 | 20 2b 3d 20 77 69 6e 64 |ct.right| += wind|
|000014f0| 6f 77 46 72 61 6d 65 52 | 69 67 68 74 53 69 7a 65 |owFrameR|ightSize|
|00001500| 3b 0d 09 09 6e 65 77 53 | 74 61 6e 64 61 72 64 52 |;...newS|tandardR|
|00001510| 65 63 74 2e 62 6f 74 74 | 6f 6d 20 2b 3d 20 77 69 |ect.bott|om += wi|
|00001520| 6e 64 6f 77 46 72 61 6d | 65 42 6f 74 74 6f 6d 53 |ndowFram|eBottomS|
|00001530| 69 7a 65 3b 0d 09 09 0d | 09 09 2f 2f 20 49 66 20 |ize;....|..// If |
|00001540| 74 68 65 20 6e 65 77 20 | 72 65 63 74 61 6e 67 6c |the new |rectangl|
|00001550| 65 20 66 61 6c 6c 73 20 | 6f 66 66 20 74 68 65 20 |e falls |off the |
|00001560| 65 64 67 65 20 6f 66 20 | 74 68 65 20 73 63 72 65 |edge of |the scre|
|00001570| 65 6e 2c 20 6e 75 64 67 | 65 20 69 74 20 73 6f 20 |en, nudg|e it so |
|00001580| 74 68 61 74 20 69 74 d5 | 73 20 6a 75 73 74 0d 09 |that it.|s just..|
|00001590| 09 2f 2f 20 6f 6e 20 74 | 68 65 20 73 63 72 65 65 |.// on t|he scree|
|000015a0| 6e 2e 20 43 61 6c 63 75 | 6c 61 74 65 4f 66 66 73 |n. Calcu|lateOffs|
|000015b0| 65 74 41 6d 6f 75 6e 74 | 20 64 65 74 65 72 6d 69 |etAmount| determi|
|000015c0| 6e 65 73 20 68 6f 77 20 | 6d 75 63 68 20 6f 66 20 |nes how |much of |
|000015d0| 74 68 65 20 77 69 6e 64 | 6f 77 20 69 73 20 6f 66 |the wind|ow is of|
|000015e0| 66 73 63 72 65 65 6e 2e | 0d 09 09 53 65 63 74 52 |fscreen.|...SectR|
|000015f0| 65 63 74 28 26 6e 65 77 | 53 74 61 6e 64 61 72 64 |ect(&new|Standard|
|00001600| 52 65 63 74 2c 20 26 73 | 63 72 65 65 6e 52 65 63 |Rect, &s|creenRec|
|00001610| 74 2c 20 26 73 63 72 61 | 74 63 68 52 65 63 74 29 |t, &scra|tchRect)|
|00001620| 3b 0d 09 09 69 66 20 28 | 21 45 71 75 61 6c 52 65 |;...if (|!EqualRe|
|00001630| 63 74 28 26 6e 65 77 53 | 74 61 6e 64 61 72 64 52 |ct(&newS|tandardR|
|00001640| 65 63 74 2c 20 26 73 63 | 72 61 74 63 68 52 65 63 |ect, &sc|ratchRec|
|00001650| 74 29 29 20 7b 0d 09 09 | 09 68 6f 72 69 7a 6f 6e |t)) {...|.horizon|
|00001660| 74 61 6c 41 6d 6f 75 6e | 74 4f 66 66 53 63 72 65 |talAmoun|tOffScre|
|00001670| 65 6e 20 3d 20 43 61 6c | 63 75 6c 61 74 65 4f 66 |en = Cal|culateOf|
|00001680| 66 73 65 74 41 6d 6f 75 | 6e 74 28 6e 65 77 53 74 |fsetAmou|nt(newSt|
|00001690| 61 6e 64 61 72 64 52 65 | 63 74 2e 6c 65 66 74 2c |andardRe|ct.left,|
|000016a0| 0d 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |........|........|
|000016b0| 20 20 20 6e 65 77 53 74 | 61 6e 64 61 72 64 52 65 | newSt|andardRe|
|000016c0| 63 74 2e 72 69 67 68 74 | 2c 0d 09 09 09 09 09 09 |ct.right|,.......|
|000016d0| 09 09 09 09 09 09 09 09 | 09 20 20 20 73 63 72 61 |........|. scra|
|000016e0| 74 63 68 52 65 63 74 2e | 6c 65 66 74 2c 0d 09 09 |tchRect.|left,...|
|000016f0| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 20 20 20 |........|..... |
|00001700| 73 63 72 61 74 63 68 52 | 65 63 74 2e 72 69 67 68 |scratchR|ect.righ|
|00001710| 74 2c 0d 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |t,......|........|
|00001720| 09 09 20 20 20 73 63 72 | 65 65 6e 52 65 63 74 2e |.. scr|eenRect.|
|00001730| 6c 65 66 74 2c 0d 09 09 | 09 09 09 09 09 09 09 09 |left,...|........|
|00001740| 09 09 09 09 09 20 20 20 | 73 63 72 65 65 6e 52 65 |..... |screenRe|
|00001750| 63 74 2e 72 69 67 68 74 | 29 3b 0d 09 09 09 76 65 |ct.right|);....ve|
|00001760| 72 74 69 63 61 6c 41 6d | 6f 75 6e 74 4f 66 66 53 |rticalAm|ountOffS|
|00001770| 63 72 65 65 6e 20 3d 20 | 43 61 6c 63 75 6c 61 74 |creen = |Calculat|
|00001780| 65 4f 66 66 73 65 74 41 | 6d 6f 75 6e 74 28 6e 65 |eOffsetA|mount(ne|
|00001790| 77 53 74 61 6e 64 61 72 | 64 52 65 63 74 2e 74 6f |wStandar|dRect.to|
|000017a0| 70 2c 0d 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |p,......|........|
|000017b0| 09 09 6e 65 77 53 74 61 | 6e 64 61 72 64 52 65 63 |..newSta|ndardRec|
|000017c0| 74 2e 62 6f 74 74 6f 6d | 2c 0d 09 09 09 09 09 09 |t.bottom|,.......|
|000017d0| 09 09 09 09 09 09 09 09 | 09 73 63 72 61 74 63 68 |........|.scratch|
|000017e0| 52 65 63 74 2e 74 6f 70 | 2c 0d 09 09 09 09 09 09 |Rect.top|,.......|
|000017f0| 09 09 09 09 09 09 09 09 | 09 73 63 72 61 74 63 68 |........|.scratch|
|00001800| 52 65 63 74 2e 62 6f 74 | 74 6f 6d 2c 0d 09 09 09 |Rect.bot|tom,....|
|00001810| 09 09 09 09 09 09 09 09 | 09 09 09 09 73 63 72 65 |........|....scre|
|00001820| 65 6e 52 65 63 74 2e 74 | 6f 70 2c 0d 09 09 09 09 |enRect.t|op,.....|
|00001830| 09 09 09 09 09 09 09 09 | 09 09 09 73 63 72 65 65 |........|...scree|
|00001840| 6e 52 65 63 74 2e 62 6f | 74 74 6f 6d 29 3b 0d 09 |nRect.bo|ttom);..|
|00001850| 09 09 4f 66 66 73 65 74 | 52 65 63 74 28 26 6e 65 |..Offset|Rect(&ne|
|00001860| 77 53 74 61 6e 64 61 72 | 64 52 65 63 74 2c 20 68 |wStandar|dRect, h|
|00001870| 6f 72 69 7a 6f 6e 74 61 | 6c 41 6d 6f 75 6e 74 4f |orizonta|lAmountO|
|00001880| 66 66 53 63 72 65 65 6e | 2c 0d 09 09 09 09 09 09 |ffScreen|,.......|
|00001890| 76 65 72 74 69 63 61 6c | 41 6d 6f 75 6e 74 4f 66 |vertical|AmountOf|
|000018a0| 66 53 63 72 65 65 6e 29 | 3b 0d 09 09 7d 0d 09 0d |fScreen)|;...}...|
|000018b0| 09 09 2f 2f 20 49 66 20 | 77 65 d5 72 65 20 73 74 |..// If |we.re st|
|000018c0| 69 6c 6c 20 66 61 6c 6c | 69 6e 67 20 6f 66 66 20 |ill fall|ing off |
|000018d0| 74 68 65 20 65 64 67 65 | 20 6f 66 20 74 68 65 20 |the edge| of the |
|000018e0| 73 63 72 65 65 6e 2c 20 | 74 68 61 74 20 6d 65 61 |screen, |that mea|
|000018f0| 6e 73 20 74 68 61 74 20 | 74 68 65 20 70 65 72 66 |ns that |the perf|
|00001900| 65 63 74 0d 09 09 2f 2f | 20 73 69 7a 65 20 69 73 |ect...//| size is|
|00001910| 20 6c 61 72 67 65 72 20 | 74 68 61 6e 20 74 68 65 | larger |than the|
|00001920| 20 73 63 72 65 65 6e 2c | 20 73 6f 20 77 65 20 6e | screen,| so we n|
|00001930| 65 65 64 20 74 6f 20 73 | 68 72 69 6e 6b 20 64 6f |eed to s|hrink do|
|00001940| 77 6e 20 74 68 65 20 73 | 74 61 6e 64 61 72 64 20 |wn the s|tandard |
|00001950| 73 69 7a 65 0d 09 09 53 | 65 63 74 52 65 63 74 28 |size...S|ectRect(|
|00001960| 26 6e 65 77 53 74 61 6e | 64 61 72 64 52 65 63 74 |&newStan|dardRect|
|00001970| 2c 20 26 73 63 72 65 65 | 6e 52 65 63 74 2c 20 26 |, &scree|nRect, &|
|00001980| 73 63 72 61 74 63 68 52 | 65 63 74 29 3b 0d 09 09 |scratchR|ect);...|
|00001990| 69 66 20 28 21 45 71 75 | 61 6c 52 65 63 74 28 26 |if (!Equ|alRect(&|
|000019a0| 6e 65 77 53 74 61 6e 64 | 61 72 64 52 65 63 74 2c |newStand|ardRect,|
|000019b0| 20 26 73 63 72 61 74 63 | 68 52 65 63 74 29 29 20 | &scratc|hRect)) |
|000019c0| 7b 0d 0d 09 09 2f 2f 20 | 46 69 72 73 74 20 73 68 |{....// |First sh|
|000019d0| 72 69 6e 6b 20 74 68 65 | 20 77 69 64 74 68 20 6f |rink the| width o|
|000019e0| 66 20 74 68 65 20 77 69 | 6e 64 6f 77 2e 20 49 66 |f the wi|ndow. If|
|000019f0| 20 74 68 65 20 77 69 6e | 64 6f 77 20 69 73 20 77 | the win|dow is w|
|00001a00| 69 64 65 72 20 74 68 61 | 6e 20 74 68 65 20 73 63 |ider tha|n the sc|
|00001a10| 72 65 65 6e 0d 09 09 2f | 2f 20 69 74 20 69 73 20 |reen.../|/ it is |
|00001a20| 7a 6f 6f 6d 69 6e 67 20 | 74 6f 2c 20 77 65 20 63 |zooming |to, we c|
|00001a30| 61 6e 20 6a 75 73 74 20 | 70 69 6e 20 74 68 65 20 |an just |pin the |
|00001a40| 73 74 61 6e 64 61 72 64 | 20 72 65 63 74 61 6e 67 |standard| rectang|
|00001a50| 6c 65 20 74 6f 20 74 68 | 65 20 65 64 67 65 73 20 |le to th|e edges |
|00001a60| 6f 66 20 74 68 65 0d 09 | 09 2f 2f 20 73 63 72 65 |of the..|.// scre|
|00001a70| 65 6e 2c 20 6c 65 61 76 | 69 6e 67 20 73 6f 6d 65 |en, leav|ing some|
|00001a80| 20 73 6c 6f 70 2e 20 49 | 66 20 74 68 65 20 77 69 | slop. I|f the wi|
|00001a90| 6e 64 6f 77 20 69 73 20 | 6e 61 72 72 6f 77 65 72 |ndow is |narrower|
|00001aa0| 20 74 68 61 6e 20 74 68 | 65 20 73 63 72 65 65 6e | than th|e screen|
|00001ab0| 2c 20 77 65 20 6b 6e 6f | 77 0d 09 09 2f 2f 20 77 |, we kno|w...// w|
|00001ac0| 65 20 6a 75 73 74 20 6e | 75 64 67 65 64 20 69 74 |e just n|udged it|
|00001ad0| 20 69 6e 74 6f 20 70 6f | 73 69 74 69 6f 6e 2c 20 | into po|sition, |
|00001ae0| 73 6f 20 6e 6f 74 68 69 | 6e 67 20 6e 65 65 64 73 |so nothi|ng needs|
|00001af0| 20 74 6f 20 62 65 20 64 | 6f 6e 65 2e 0d 09 09 09 | to be d|one.....|
|00001b00| 69 66 20 28 28 6e 65 77 | 53 74 61 6e 64 61 72 64 |if ((new|Standard|
|00001b10| 52 65 63 74 2e 72 69 67 | 68 74 20 2d 20 6e 65 77 |Rect.rig|ht - new|
|00001b20| 53 74 61 6e 64 61 72 64 | 52 65 63 74 2e 6c 65 66 |Standard|Rect.lef|
|00001b30| 74 29 20 3e 0d 09 09 09 | 09 28 73 63 72 65 65 6e |t) >....|.(screen|
|00001b40| 52 65 63 74 2e 72 69 67 | 68 74 20 2d 20 73 63 72 |Rect.rig|ht - scr|
|00001b50| 65 65 6e 52 65 63 74 2e | 6c 65 66 74 29 29 20 7b |eenRect.|left)) {|
|00001b60| 0d 09 09 09 09 6e 65 77 | 53 74 61 6e 64 61 72 64 |.....new|Standard|
|00001b70| 52 65 63 74 2e 6c 65 66 | 74 20 3d 20 73 63 72 65 |Rect.lef|t = scre|
|00001b80| 65 6e 52 65 63 74 2e 6c | 65 66 74 20 2b 20 6b 4e |enRect.l|eft + kN|
|00001b90| 75 64 67 65 53 6c 6f 70 | 3b 0d 09 09 09 09 6e 65 |udgeSlop|;.....ne|
|00001ba0| 77 53 74 61 6e 64 61 72 | 64 52 65 63 74 2e 72 69 |wStandar|dRect.ri|
|00001bb0| 67 68 74 20 3d 20 73 63 | 72 65 65 6e 52 65 63 74 |ght = sc|reenRect|
|00001bc0| 2e 72 69 67 68 74 20 2d | 20 6b 4e 75 64 67 65 53 |.right -| kNudgeS|
|00001bd0| 6c 6f 70 3b 0d 0d 09 09 | 09 09 69 66 20 28 28 7a |lop;....|..if ((z|
|00001be0| 6f 6f 6d 44 61 74 61 2e | 73 63 72 65 65 6e 57 69 |oomData.|screenWi|
|00001bf0| 74 68 4c 61 72 67 65 73 | 74 50 61 72 74 4f 66 57 |thLarges|tPartOfW|
|00001c00| 69 6e 64 6f 77 20 3d 3d | 20 6d 61 69 6e 44 65 76 |indow ==| mainDev|
|00001c10| 69 63 65 29 20 26 26 0d | 09 09 09 09 09 28 6e 65 |ice) &&.|.....(ne|
|00001c20| 77 53 74 61 6e 64 61 72 | 64 52 65 63 74 2e 72 69 |wStandar|dRect.ri|
|00001c30| 67 68 74 20 3e 20 28 73 | 63 72 65 65 6e 52 65 63 |ght > (s|creenRec|
|00001c40| 74 2e 72 69 67 68 74 20 | 2d 20 6b 49 63 6f 6e 53 |t.right |- kIconS|
|00001c50| 70 61 63 65 29 29 29 0d | 09 09 09 09 09 6e 65 77 |pace))).|.....new|
|00001c60| 53 74 61 6e 64 61 72 64 | 52 65 63 74 2e 72 69 67 |Standard|Rect.rig|
|00001c70| 68 74 20 3d 20 73 63 72 | 65 65 6e 52 65 63 74 2e |ht = scr|eenRect.|
|00001c80| 72 69 67 68 74 20 2d 20 | 6b 49 63 6f 6e 53 70 61 |right - |kIconSpa|
|00001c90| 63 65 3b 0d 09 09 09 7d | 0d 0d 09 09 09 2f 2f 20 |ce;....}|.....// |
|00001ca0| 4d 6f 76 65 20 69 6e 20 | 74 68 65 20 74 6f 70 2e |Move in |the top.|
|00001cb0| 20 4c 69 6b 65 20 74 68 | 65 20 77 69 64 74 68 20 | Like th|e width |
|00001cc0| 6f 66 20 74 68 65 20 77 | 69 6e 64 6f 77 2c 20 6e |of the w|indow, n|
|00001cd0| 6f 74 68 69 6e 67 20 6e | 65 65 64 73 20 74 6f 20 |othing n|eeds to |
|00001ce0| 62 65 20 64 6f 6e 65 20 | 75 6e 6c 65 73 73 0d 09 |be done |unless..|
|00001cf0| 09 09 2f 2f 20 74 68 65 | 20 77 69 6e 64 6f 77 20 |..// the| window |
|00001d00| 69 73 20 74 61 6c 6c 65 | 72 20 74 68 61 6e 20 74 |is talle|r than t|
|00001d10| 68 65 20 68 65 69 67 68 | 74 20 6f 66 20 74 68 65 |he heigh|t of the|
|00001d20| 20 73 63 72 65 65 6e 2e | 0d 09 09 09 69 66 20 28 | screen.|....if (|
|00001d30| 28 6e 65 77 53 74 61 6e | 64 61 72 64 52 65 63 74 |(newStan|dardRect|
|00001d40| 2e 62 6f 74 74 6f 6d 20 | 2d 20 6e 65 77 53 74 61 |.bottom |- newSta|
|00001d50| 6e 64 61 72 64 52 65 63 | 74 2e 74 6f 70 29 20 3e |ndardRec|t.top) >|
|00001d60| 0d 09 09 09 09 28 73 63 | 72 65 65 6e 52 65 63 74 |.....(sc|reenRect|
|00001d70| 2e 62 6f 74 74 6f 6d 20 | 2d 20 73 63 72 65 65 6e |.bottom |- screen|
|00001d80| 52 65 63 74 2e 74 6f 70 | 29 29 20 7b 0d 09 09 09 |Rect.top|)) {....|
|00001d90| 09 6e 65 77 53 74 61 6e | 64 61 72 64 52 65 63 74 |.newStan|dardRect|
|00001da0| 2e 74 6f 70 20 3d 20 73 | 63 72 65 65 6e 52 65 63 |.top = s|creenRec|
|00001db0| 74 2e 74 6f 70 20 2b 20 | 6b 4e 75 64 67 65 53 6c |t.top + |kNudgeSl|
|00001dc0| 6f 70 3b 0d 09 09 09 09 | 6e 65 77 53 74 61 6e 64 |op;.....|newStand|
|00001dd0| 61 72 64 52 65 63 74 2e | 62 6f 74 74 6f 6d 20 3d |ardRect.|bottom =|
|00001de0| 20 73 63 72 65 65 6e 52 | 65 63 74 2e 62 6f 74 74 | screenR|ect.bott|
|00001df0| 6f 6d 20 2d 20 6b 4e 75 | 64 67 65 53 6c 6f 70 3b |om - kNu|dgeSlop;|
|00001e00| 0d 09 09 09 7d 0d 09 09 | 7d 0d 0d 09 09 2f 2f 20 |....}...|}....// |
|00001e10| 57 65 d5 76 65 20 67 6f | 74 20 74 68 65 20 62 65 |We.ve go|t the be|
|00001e20| 73 74 20 70 6f 73 73 69 | 62 6c 65 20 77 69 6e 64 |st possi|ble wind|
|00001e30| 6f 77 20 70 6f 73 69 74 | 69 6f 6e 2e 20 52 65 6d |ow posit|ion. Rem|
|00001e40| 6f 76 65 20 74 68 65 0d | 09 09 2f 2f 20 66 72 61 |ove the.|..// fra|
|00001e50| 6d 65 2c 20 73 6c 61 6d | 20 69 74 20 69 6e 74 6f |me, slam| it into|
|00001e60| 20 74 68 65 20 57 53 74 | 61 74 65 44 61 74 61 20 | the WSt|ateData |
|00001e70| 72 65 63 6f 72 64 20 61 | 6e 64 20 6c 65 74 20 5a |record a|nd let Z|
|00001e80| 6f 6f 6d 57 69 6e 64 6f | 77 0d 09 09 2f 2f 20 74 |oomWindo|w...// t|
|00001e90| 61 6b 65 20 63 61 72 65 | 20 6f 66 20 74 68 65 20 |ake care| of the |
|00001ea0| 72 65 73 74 2e 0d 09 09 | 6e 65 77 53 74 61 6e 64 |rest....|newStand|
|00001eb0| 61 72 64 52 65 63 74 2e | 74 6f 70 20 2b 3d 20 77 |ardRect.|top += w|
|00001ec0| 69 6e 64 6f 77 46 72 61 | 6d 65 54 6f 70 53 69 7a |indowFra|meTopSiz|
|00001ed0| 65 3b 0d 09 09 6e 65 77 | 53 74 61 6e 64 61 72 64 |e;...new|Standard|
|00001ee0| 52 65 63 74 2e 6c 65 66 | 74 20 2b 3d 20 77 69 6e |Rect.lef|t += win|
|00001ef0| 64 6f 77 46 72 61 6d 65 | 4c 65 66 74 53 69 7a 65 |dowFrame|LeftSize|
|00001f00| 3b 0d 09 09 6e 65 77 53 | 74 61 6e 64 61 72 64 52 |;...newS|tandardR|
|00001f10| 65 63 74 2e 72 69 67 68 | 74 20 2d 3d 20 77 69 6e |ect.righ|t -= win|
|00001f20| 64 6f 77 46 72 61 6d 65 | 52 69 67 68 74 53 69 7a |dowFrame|RightSiz|
|00001f30| 65 3b 0d 09 09 6e 65 77 | 53 74 61 6e 64 61 72 64 |e;...new|Standard|
|00001f40| 52 65 63 74 2e 62 6f 74 | 74 6f 6d 20 2d 3d 20 77 |Rect.bot|tom -= w|
|00001f50| 69 6e 64 6f 77 46 72 61 | 6d 65 42 6f 74 74 6f 6d |indowFra|meBottom|
|00001f60| 53 69 7a 65 3b 0d 09 09 | 53 65 74 57 69 6e 64 6f |Size;...|SetWindo|
|00001f70| 77 53 74 61 6e 64 61 72 | 64 53 74 61 74 65 28 74 |wStandar|dState(t|
|00001f80| 68 65 57 69 6e 64 6f 77 | 2c 20 26 6e 65 77 53 74 |heWindow|, &newSt|
|00001f90| 61 6e 64 61 72 64 52 65 | 63 74 29 3b 0d 09 7d 0d |andardRe|ct);..}.|
|00001fa0| 09 65 6c 73 65 0d 09 09 | 47 65 74 57 69 6e 64 6f |.else...|GetWindo|
|00001fb0| 77 55 73 65 72 53 74 61 | 74 65 28 74 68 65 57 69 |wUserSta|te(theWi|
|00001fc0| 6e 64 6f 77 2c 20 26 6e | 65 77 53 74 61 6e 64 61 |ndow, &n|ewStanda|
|00001fd0| 72 64 52 65 63 74 29 3b | 0d 09 09 0d 09 2f 2f 20 |rdRect);|.....// |
|00001fe0| 49 66 20 74 68 65 20 77 | 69 6e 64 6f 77 20 69 73 |If the w|indow is|
|00001ff0| 20 73 74 69 6c 6c 20 61 | 6e 63 68 6f 72 65 64 20 | still a|nchored |
|00002000| 61 74 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 6c |at the c|urrent l|
|00002010| 6f 63 61 74 69 6f 6e 2c | 20 74 68 65 6e 20 6a 75 |ocation,| then ju|
|00002020| 73 74 20 72 65 73 69 7a | 65 20 69 74 0d 09 69 66 |st resiz|e it..if|
|00002030| 20 28 28 6e 65 77 53 74 | 61 6e 64 61 72 64 52 65 | ((newSt|andardRe|
|00002040| 63 74 2e 6c 65 66 74 20 | 3d 3d 20 63 6f 6e 74 65 |ct.left |== conte|
|00002050| 6e 74 52 65 67 69 6f 6e | 42 6f 75 6e 64 69 6e 67 |ntRegion|Bounding|
|00002060| 42 6f 78 2e 6c 65 66 74 | 29 20 26 26 0d 09 09 28 |Box.left|) &&...(|
|00002070| 6e 65 77 53 74 61 6e 64 | 61 72 64 52 65 63 74 2e |newStand|ardRect.|
|00002080| 74 6f 70 20 3d 3d 20 63 | 6f 6e 74 65 6e 74 52 65 |top == c|ontentRe|
|00002090| 67 69 6f 6e 42 6f 75 6e | 64 69 6e 67 42 6f 78 2e |gionBoun|dingBox.|
|000020a0| 74 6f 70 29 29 20 7b 0d | 09 09 4f 66 66 73 65 74 |top)) {.|..Offset|
|000020b0| 52 65 63 74 28 26 6e 65 | 77 53 74 61 6e 64 61 72 |Rect(&ne|wStandar|
|000020c0| 64 52 65 63 74 2c 20 2d | 6e 65 77 53 74 61 6e 64 |dRect, -|newStand|
|000020d0| 61 72 64 52 65 63 74 2e | 6c 65 66 74 2c 20 2d 6e |ardRect.|left, -n|
|000020e0| 65 77 53 74 61 6e 64 61 | 72 64 52 65 63 74 2e 74 |ewStanda|rdRect.t|
|000020f0| 6f 70 29 3b 0d 09 09 53 | 69 7a 65 57 69 6e 64 6f |op);...S|izeWindo|
|00002100| 77 28 28 57 69 6e 64 6f | 77 50 74 72 29 20 74 68 |w((Windo|wPtr) th|
|00002110| 65 57 69 6e 64 6f 77 2c | 20 6e 65 77 53 74 61 6e |eWindow,| newStan|
|00002120| 64 61 72 64 52 65 63 74 | 2e 72 69 67 68 74 2c 20 |dardRect|.right, |
|00002130| 6e 65 77 53 74 61 6e 64 | 61 72 64 52 65 63 74 2e |newStand|ardRect.|
|00002140| 62 6f 74 74 6f 6d 2c 0d | 09 09 09 09 09 74 72 75 |bottom,.|.....tru|
|00002150| 65 29 3b 0d 09 7d 0d 09 | 65 6c 73 65 20 7b 0d 09 |e);..}..|else {..|
|00002160| 09 73 63 72 61 74 63 68 | 52 65 67 69 6f 6e 20 3d |.scratch|Region =|
|00002170| 20 4e 65 77 52 67 6e 28 | 29 3b 0d 09 09 47 65 74 | NewRgn(|);...Get|
|00002180| 43 6c 69 70 28 73 63 72 | 61 74 63 68 52 65 67 69 |Clip(scr|atchRegi|
|00002190| 6f 6e 29 3b 0d 09 09 43 | 6c 69 70 52 65 63 74 28 |on);...C|lipRect(|
|000021a0| 26 70 6f 72 74 52 65 63 | 74 29 3b 0d 09 09 45 72 |&portRec|t);...Er|
|000021b0| 61 73 65 52 65 63 74 28 | 26 70 6f 72 74 52 65 63 |aseRect(|&portRec|
|000021c0| 74 29 3b 0d 09 09 5a 6f | 6f 6d 57 69 6e 64 6f 77 |t);...Zo|omWindow|
|000021d0| 28 28 57 69 6e 64 6f 77 | 50 74 72 29 20 74 68 65 |((Window|Ptr) the|
|000021e0| 57 69 6e 64 6f 77 2c 20 | 7a 6f 6f 6d 53 74 61 74 |Window, |zoomStat|
|000021f0| 65 2c 20 66 61 6c 73 65 | 29 3b 0d 09 09 53 65 74 |e, false|);...Set|
|00002200| 43 6c 69 70 28 73 63 72 | 61 74 63 68 52 65 67 69 |Clip(scr|atchRegi|
|00002210| 6f 6e 29 3b 0d 09 09 44 | 69 73 70 6f 73 65 52 67 |on);...D|isposeRg|
|00002220| 6e 28 73 63 72 61 74 63 | 68 52 65 67 69 6f 6e 29 |n(scratc|hRegion)|
|00002230| 3b 0d 09 7d 0d 09 0d 09 | 53 65 74 50 6f 72 74 28 |;..}....|SetPort(|
|00002240| 63 75 72 72 65 6e 74 50 | 6f 72 74 29 3b 0d 7d 0d |currentP|ort);.}.|
|00002250| 0d 70 61 73 63 61 6c 20 | 76 6f 69 64 09 43 61 6c |.pascal |void.Cal|
|00002260| 63 57 69 6e 64 6f 77 41 | 72 65 61 4f 6e 53 63 72 |cWindowA|reaOnScr|
|00002270| 65 65 6e 28 73 68 6f 72 | 74 20 64 65 70 74 68 2c |een(shor|t depth,|
|00002280| 20 73 68 6f 72 74 20 64 | 65 76 69 63 65 46 6c 61 | short d|eviceFla|
|00002290| 67 73 2c 20 47 44 48 61 | 6e 64 6c 65 20 74 61 72 |gs, GDHa|ndle tar|
|000022a0| 67 65 74 44 65 76 69 63 | 65 2c 20 6c 6f 6e 67 20 |getDevic|e, long |
|000022b0| 75 73 65 72 44 61 74 61 | 29 0d 7b 0d 23 70 72 61 |userData|).{.#pra|
|000022c0| 67 6d 61 20 75 6e 75 73 | 65 64 20 28 64 65 70 74 |gma unus|ed (dept|
|000022d0| 68 2c 20 64 65 76 69 63 | 65 46 6c 61 67 73 29 0d |h, devic|eFlags).|
|000022e0| 09 5a 6f 6f 6d 44 61 74 | 61 50 74 72 09 7a 6f 6f |.ZoomDat|aPtr.zoo|
|000022f0| 6d 44 61 74 61 20 3d 20 | 28 5a 6f 6f 6d 44 61 74 |mData = |(ZoomDat|
|00002300| 61 50 74 72 29 20 75 73 | 65 72 44 61 74 61 3b 0d |aPtr) us|erData;.|
|00002310| 09 6c 6f 6e 67 09 09 77 | 69 6e 64 6f 77 41 72 65 |.long..w|indowAre|
|00002320| 61 4f 6e 53 63 72 65 65 | 6e 3b 0d 09 52 65 63 74 |aOnScree|n;..Rect|
|00002330| 09 09 77 69 6e 64 6f 77 | 50 6f 72 74 69 6f 6e 4f |..window|PortionO|
|00002340| 6e 53 63 72 65 65 6e 3b | 0d 09 0d 09 2f 2f 20 46 |nScreen;|....// F|
|00002350| 69 6e 64 20 74 68 65 20 | 72 65 63 74 61 6e 67 6c |ind the |rectangl|
|00002360| 65 20 74 68 61 74 20 65 | 6e 63 6c 6f 73 65 73 20 |e that e|ncloses |
|00002370| 74 68 65 20 69 6e 74 65 | 72 73 65 63 74 69 6f 6e |the inte|rsection|
|00002380| 20 6f 66 20 74 68 65 20 | 77 69 6e 64 6f 77 20 61 | of the |window a|
|00002390| 6e 64 20 74 68 69 73 20 | 73 63 72 65 65 6e 2e 0d |nd this |screen..|
|000023a0| 09 53 65 63 74 52 65 63 | 74 28 26 28 7a 6f 6f 6d |.SectRec|t(&(zoom|
|000023b0| 44 61 74 61 2d 3e 77 69 | 6e 64 6f 77 42 6f 75 6e |Data->wi|ndowBoun|
|000023c0| 64 73 29 2c 20 26 28 28 | 2a 2a 74 61 72 67 65 74 |ds), &((|**target|
|000023d0| 44 65 76 69 63 65 29 2e | 67 64 52 65 63 74 29 2c |Device).|gdRect),|
|000023e0| 20 26 77 69 6e 64 6f 77 | 50 6f 72 74 69 6f 6e 4f | &window|PortionO|
|000023f0| 6e 53 63 72 65 65 6e 29 | 3b 0d 09 0d 09 2f 2f 20 |nScreen)|;....// |
|00002400| 4f 66 66 73 65 74 20 74 | 68 65 20 72 65 63 74 61 |Offset t|he recta|
|00002410| 6e 67 6c 65 20 73 6f 20 | 74 68 61 74 20 69 74 d5 |ngle so |that it.|
|00002420| 73 20 72 69 67 68 74 20 | 61 6e 64 20 62 6f 74 74 |s right |and bott|
|00002430| 6f 6d 20 61 72 65 20 61 | 6c 73 6f 20 69 74 d5 73 |om are a|lso it.s|
|00002440| 20 77 69 64 74 68 20 61 | 6e 64 20 68 65 69 67 68 | width a|nd heigh|
|00002450| 74 2e 0d 09 4f 66 66 73 | 65 74 52 65 63 74 28 26 |t...Offs|etRect(&|
|00002460| 77 69 6e 64 6f 77 50 6f | 72 74 69 6f 6e 4f 6e 53 |windowPo|rtionOnS|
|00002470| 63 72 65 65 6e 2c 20 2d | 77 69 6e 64 6f 77 50 6f |creen, -|windowPo|
|00002480| 72 74 69 6f 6e 4f 6e 53 | 63 72 65 65 6e 2e 6c 65 |rtionOnS|creen.le|
|00002490| 66 74 2c 20 2d 77 69 6e | 64 6f 77 50 6f 72 74 69 |ft, -win|dowPorti|
|000024a0| 6f 6e 4f 6e 53 63 72 65 | 65 6e 2e 74 6f 70 29 3b |onOnScre|en.top);|
|000024b0| 0d 09 0d 09 2f 2f 20 43 | 61 6c 63 75 6c 61 74 65 |....// C|alculate|
|000024c0| 20 74 68 65 20 61 72 65 | 61 20 6f 66 20 74 68 65 | the are|a of the|
|000024d0| 20 70 6f 72 74 69 6f 6e | 20 6f 66 20 74 68 65 20 | portion| of the |
|000024e0| 77 69 6e 64 6f 77 20 74 | 68 61 74 d5 73 20 6f 6e |window t|hat.s on|
|000024f0| 20 74 68 69 73 20 73 63 | 72 65 65 6e 2e 0d 09 77 | this sc|reen...w|
|00002500| 69 6e 64 6f 77 41 72 65 | 61 4f 6e 53 63 72 65 65 |indowAre|aOnScree|
|00002510| 6e 20 3d 20 28 6c 6f 6e | 67 29 20 77 69 6e 64 6f |n = (lon|g) windo|
|00002520| 77 50 6f 72 74 69 6f 6e | 4f 6e 53 63 72 65 65 6e |wPortion|OnScreen|
|00002530| 2e 72 69 67 68 74 20 2a | 20 28 6c 6f 6e 67 29 20 |.right *| (long) |
|00002540| 77 69 6e 64 6f 77 50 6f | 72 74 69 6f 6e 4f 6e 53 |windowPo|rtionOnS|
|00002550| 63 72 65 65 6e 2e 62 6f | 74 74 6f 6d 3b 0d 09 0d |creen.bo|ttom;...|
|00002560| 09 2f 2f 20 49 66 20 74 | 68 69 73 20 69 73 20 74 |.// If t|his is t|
|00002570| 68 65 20 6c 61 72 67 65 | 73 74 20 70 6f 72 74 69 |he large|st porti|
|00002580| 6f 6e 20 6f 66 20 74 68 | 65 20 77 69 6e 64 6f 77 |on of th|e window|
|00002590| 20 74 68 61 74 20 68 61 | 73 20 62 65 65 6e 20 65 | that ha|s been e|
|000025a0| 6e 63 6f 75 6e 74 65 72 | 65 64 20 73 6f 20 66 61 |ncounter|ed so fa|
|000025b0| 72 2c 0d 09 2f 2f 20 72 | 65 6d 65 6d 62 65 72 20 |r,..// r|emember |
|000025c0| 74 68 69 73 20 73 63 72 | 65 65 6e 20 61 73 20 74 |this scr|een as t|
|000025d0| 68 65 20 70 6f 74 65 6e | 74 69 61 6c 20 73 63 72 |he poten|tial scr|
|000025e0| 65 65 6e 20 74 6f 20 7a | 6f 6f 6d 20 74 6f 2e 0d |een to z|oom to..|
|000025f0| 09 69 66 20 28 77 69 6e | 64 6f 77 41 72 65 61 4f |.if (win|dowAreaO|
|00002600| 6e 53 63 72 65 65 6e 20 | 3e 20 7a 6f 6f 6d 44 61 |nScreen |> zoomDa|
|00002610| 74 61 2d 3e 6c 61 72 67 | 65 73 74 41 72 65 61 29 |ta->larg|estArea)|
|00002620| 20 7b 0d 09 09 7a 6f 6f | 6d 44 61 74 61 2d 3e 6c | {...zoo|mData->l|
|00002630| 61 72 67 65 73 74 41 72 | 65 61 20 3d 20 77 69 6e |argestAr|ea = win|
|00002640| 64 6f 77 41 72 65 61 4f | 6e 53 63 72 65 65 6e 3b |dowAreaO|nScreen;|
|00002650| 0d 09 09 7a 6f 6f 6d 44 | 61 74 61 2d 3e 73 63 72 |...zoomD|ata->scr|
|00002660| 65 65 6e 57 69 74 68 4c | 61 72 67 65 73 74 50 61 |eenWithL|argestPa|
|00002670| 72 74 4f 66 57 69 6e 64 | 6f 77 20 3d 20 74 61 72 |rtOfWind|ow = tar|
|00002680| 67 65 74 44 65 76 69 63 | 65 3b 0d 09 7d 0d 7d 0d |getDevic|e;..}.}.|
|00002690| 0d 2f 2f 20 46 69 67 75 | 72 65 20 6f 75 74 20 68 |.// Figu|re out h|
|000026a0| 6f 77 20 6d 75 63 68 20 | 77 65 20 6e 65 65 64 20 |ow much |we need |
|000026b0| 74 6f 20 6d 6f 76 65 20 | 74 68 65 20 77 69 6e 64 |to move |the wind|
|000026c0| 6f 77 20 74 6f 20 67 65 | 74 20 69 74 20 65 6e 74 |ow to ge|t it ent|
|000026d0| 69 72 65 6c 79 20 6f 6e | 20 74 68 65 20 6d 6f 6e |irely on| the mon|
|000026e0| 69 74 6f 72 2e 20 20 49 | 66 0d 2f 2f 20 74 68 65 |itor. I|f.// the|
|000026f0| 20 77 69 6e 64 6f 77 20 | 77 6f 75 6c 64 6e d5 74 | window |wouldn.t|
|00002700| 20 66 69 74 20 63 6f 6d | 70 6c 65 74 65 6c 79 20 | fit com|pletely |
|00002710| 6f 6e 20 74 68 65 20 6d | 6f 6e 69 74 6f 72 20 61 |on the m|onitor a|
|00002720| 6e 79 77 61 79 2c 20 64 | 6f 6e d5 74 20 6d 6f 76 |nyway, d|on.t mov|
|00002730| 65 20 69 74 20 61 74 20 | 61 6c 6c 3b 20 77 65 d5 |e it at |all; we.|
|00002740| 6c 6c 0d 2f 2f 20 6d 61 | 6b 65 20 69 74 20 66 69 |ll.// ma|ke it fi|
|00002750| 74 20 6c 61 74 65 72 20 | 6f 6e 2e 0d 0d 73 68 6f |t later |on...sho|
|00002760| 72 74 20 43 61 6c 63 75 | 6c 61 74 65 4f 66 66 73 |rt Calcu|lateOffs|
|00002770| 65 74 41 6d 6f 75 6e 74 | 28 73 68 6f 72 74 20 69 |etAmount|(short i|
|00002780| 64 65 61 6c 53 74 61 72 | 74 50 6f 69 6e 74 2c 20 |dealStar|tPoint, |
|00002790| 73 68 6f 72 74 20 69 64 | 65 61 6c 45 6e 64 50 6f |short id|ealEndPo|
|000027a0| 69 6e 74 2c 20 73 68 6f | 72 74 20 69 64 65 61 6c |int, sho|rt ideal|
|000027b0| 4f 6e 53 63 72 65 65 6e | 53 74 61 72 74 50 6f 69 |OnScreen|StartPoi|
|000027c0| 6e 74 2c 0d 09 09 09 09 | 09 09 09 73 68 6f 72 74 |nt,.....|...short|
|000027d0| 20 69 64 65 61 6c 4f 6e | 53 63 72 65 65 6e 45 6e | idealOn|ScreenEn|
|000027e0| 64 50 6f 69 6e 74 2c 20 | 73 68 6f 72 74 20 73 63 |dPoint, |short sc|
|000027f0| 72 65 65 6e 45 64 67 65 | 31 2c 20 73 68 6f 72 74 |reenEdge|1, short|
|00002800| 20 73 63 72 65 65 6e 45 | 64 67 65 32 29 0d 7b 0d | screenE|dge2).{.|
|00002810| 09 73 68 6f 72 74 09 6f | 66 66 73 65 74 41 6d 6f |.short.o|ffsetAmo|
|00002820| 75 6e 74 3b 0d 0d 09 2f | 2f 20 46 69 72 73 74 20 |unt;.../|/ First |
|00002830| 63 68 65 63 6b 20 74 6f | 20 73 65 65 20 69 66 20 |check to| see if |
|00002840| 74 68 65 20 77 69 6e 64 | 6f 77 20 66 69 74 73 20 |the wind|ow fits |
|00002850| 6f 6e 20 74 68 65 20 73 | 63 72 65 65 6e 20 69 6e |on the s|creen in|
|00002860| 20 74 68 69 73 20 64 69 | 6d 65 6e 73 69 6f 6e 2e | this di|mension.|
|00002870| 0d 09 69 66 20 28 28 69 | 64 65 61 6c 53 74 61 72 |..if ((i|dealStar|
|00002880| 74 50 6f 69 6e 74 20 3c | 20 73 63 72 65 65 6e 45 |tPoint <| screenE|
|00002890| 64 67 65 31 29 20 26 26 | 20 28 69 64 65 61 6c 45 |dge1) &&| (idealE|
|000028a0| 6e 64 50 6f 69 6e 74 20 | 3e 20 73 63 72 65 65 6e |ndPoint |> screen|
|000028b0| 45 64 67 65 32 29 29 0d | 09 09 6f 66 66 73 65 74 |Edge2)).|..offset|
|000028c0| 41 6d 6f 75 6e 74 20 3d | 20 30 3b 0d 09 65 6c 73 |Amount =| 0;..els|
|000028d0| 65 20 7b 0d 09 0d 09 09 | 2f 2f 20 46 69 6e 64 20 |e {.....|// Find |
|000028e0| 6f 75 74 20 68 6f 77 20 | 6d 75 63 68 20 6f 66 20 |out how |much of |
|000028f0| 74 68 65 20 77 69 6e 64 | 6f 77 20 6c 69 65 73 20 |the wind|ow lies |
|00002900| 6f 66 66 20 74 68 69 73 | 20 73 63 72 65 65 6e 20 |off this| screen |
|00002910| 62 79 20 73 75 62 74 72 | 61 63 74 69 6e 67 20 74 |by subtr|acting t|
|00002920| 68 65 20 61 6d 6f 75 6e | 74 20 6f 66 20 74 68 65 |he amoun|t of the|
|00002930| 20 77 69 6e 64 6f 77 0d | 09 09 2f 2f 20 74 68 61 | window.|..// tha|
|00002940| 74 20 69 73 20 6f 6e 20 | 74 68 65 20 73 63 72 65 |t is on |the scre|
|00002950| 65 6e 20 66 72 6f 6d 20 | 74 68 65 20 73 69 7a 65 |en from |the size|
|00002960| 20 6f 66 20 74 68 65 20 | 65 6e 74 69 72 65 20 77 | of the |entire w|
|00002970| 69 6e 64 6f 77 20 69 6e | 20 74 68 69 73 20 64 69 |indow in| this di|
|00002980| 6d 65 6e 73 69 6f 6e 2e | 20 49 66 20 74 68 65 20 |mension.| If the |
|00002990| 77 69 6e 64 6f 77 0d 09 | 09 2f 2f 20 69 73 20 63 |window..|.// is c|
|000029a0| 6f 6d 70 6c 65 74 65 6c | 79 20 6f 66 66 73 63 72 |ompletel|y offscr|
|000029b0| 65 65 6e 2c 20 74 68 65 | 20 6f 66 66 73 65 74 20 |een, the| offset |
|000029c0| 61 6d 6f 75 6e 74 20 69 | 73 20 67 6f 69 6e 67 20 |amount i|s going |
|000029d0| 74 6f 20 62 65 20 74 68 | 65 20 64 69 73 74 61 6e |to be th|e distan|
|000029e0| 63 65 20 66 72 6f 6d 20 | 74 68 65 20 69 64 65 61 |ce from |the idea|
|000029f0| 6c 0d 09 09 2f 2f 20 73 | 74 61 72 74 69 6e 67 20 |l...// s|tarting |
|00002a00| 70 6f 69 6e 74 20 74 6f | 20 74 68 65 20 66 69 72 |point to| the fir|
|00002a10| 73 74 20 65 64 67 65 20 | 6f 66 20 74 68 65 20 73 |st edge |of the s|
|00002a20| 63 72 65 65 6e 2e 0d 09 | 09 69 66 20 28 28 69 64 |creen...|.if ((id|
|00002a30| 65 61 6c 4f 6e 53 63 72 | 65 65 6e 53 74 61 72 74 |ealOnScr|eenStart|
|00002a40| 50 6f 69 6e 74 20 2d 20 | 69 64 65 61 6c 4f 6e 53 |Point - |idealOnS|
|00002a50| 63 72 65 65 6e 45 6e 64 | 50 6f 69 6e 74 29 20 3d |creenEnd|Point) =|
|00002a60| 3d 20 30 29 20 7b 0d 09 | 09 09 2f 2f 20 53 65 65 |= 0) {..|..// See|
|00002a70| 20 69 66 20 74 68 65 20 | 77 69 6e 64 6f 77 20 69 | if the |window i|
|00002a80| 73 20 6c 79 69 6e 67 20 | 74 6f 20 74 68 65 20 6c |s lying |to the l|
|00002a90| 65 66 74 20 6f 72 20 61 | 62 6f 76 65 20 74 68 65 |eft or a|bove the|
|00002aa0| 20 73 63 72 65 65 6e 0d | 09 09 09 69 66 20 28 69 | screen.|...if (i|
|00002ab0| 64 65 61 6c 45 6e 64 50 | 6f 69 6e 74 20 3c 20 73 |dealEndP|oint < s|
|00002ac0| 63 72 65 65 6e 45 64 67 | 65 31 29 0d 09 09 09 09 |creenEdg|e1).....|
|00002ad0| 6f 66 66 73 65 74 41 6d | 6f 75 6e 74 20 3d 20 73 |offsetAm|ount = s|
|00002ae0| 63 72 65 65 6e 45 64 67 | 65 31 20 2d 20 69 64 65 |creenEdg|e1 - ide|
|00002af0| 61 6c 53 74 61 72 74 50 | 6f 69 6e 74 20 2b 20 6b |alStartP|oint + k|
|00002b00| 4e 75 64 67 65 53 6c 6f | 70 3b 0d 09 09 09 65 6c |NudgeSlo|p;....el|
|00002b10| 73 65 0d 09 09 09 2f 2f | 20 4f 74 68 65 72 77 69 |se....//| Otherwi|
|00002b20| 73 65 2c 20 69 74 d5 73 | 20 62 65 6c 6f 77 20 6f |se, it.s| below o|
|00002b30| 72 20 74 6f 20 74 68 65 | 20 72 69 67 68 74 20 6f |r to the| right o|
|00002b40| 66 20 74 68 65 20 73 63 | 72 65 65 6e 0d 09 09 09 |f the sc|reen....|
|00002b50| 09 6f 66 66 73 65 74 41 | 6d 6f 75 6e 74 20 3d 20 |.offsetA|mount = |
|00002b60| 73 63 72 65 65 6e 45 64 | 67 65 32 20 2d 20 69 64 |screenEd|ge2 - id|
|00002b70| 65 61 6c 45 6e 64 50 6f | 69 6e 74 20 2d 20 6b 4e |ealEndPo|int - kN|
|00002b80| 75 64 67 65 53 6c 6f 70 | 3b 0d 09 09 7d 0d 09 09 |udgeSlop|;...}...|
|00002b90| 65 6c 73 65 20 7b 0d 09 | 09 09 2f 2f 20 57 69 6e |else {..|..// Win|
|00002ba0| 64 6f 77 20 69 73 20 61 | 6c 72 65 61 64 79 20 70 |dow is a|lready p|
|00002bb0| 61 72 74 69 61 6c 6c 79 | 20 6f 72 20 63 6f 6d 70 |artially| or comp|
|00002bc0| 6c 65 74 65 6c 79 20 6f | 6e 20 74 68 65 20 73 63 |letely o|n the sc|
|00002bd0| 72 65 65 6e 0d 09 09 09 | 6f 66 66 73 65 74 41 6d |reen....|offsetAm|
|00002be0| 6f 75 6e 74 20 3d 20 28 | 69 64 65 61 6c 45 6e 64 |ount = (|idealEnd|
|00002bf0| 50 6f 69 6e 74 20 2d 20 | 69 64 65 61 6c 53 74 61 |Point - |idealSta|
|00002c00| 72 74 50 6f 69 6e 74 29 | 20 2d 0d 09 09 09 09 09 |rtPoint)| -......|
|00002c10| 09 09 28 69 64 65 61 6c | 4f 6e 53 63 72 65 65 6e |..(ideal|OnScreen|
|00002c20| 45 6e 64 50 6f 69 6e 74 | 20 2d 20 69 64 65 61 6c |EndPoint| - ideal|
|00002c30| 4f 6e 53 63 72 65 65 6e | 53 74 61 72 74 50 6f 69 |OnScreen|StartPoi|
|00002c40| 6e 74 29 3b 0d 09 0d 09 | 09 09 2f 2f 20 49 66 20 |nt);....|..// If |
|00002c50| 77 65 20 61 72 65 20 6f | 66 66 73 63 72 65 65 6e |we are o|ffscreen|
|00002c60| 20 61 20 6c 69 74 74 6c | 65 2c 20 6d 6f 76 65 20 | a littl|e, move |
|00002c70| 74 68 65 20 77 69 6e 64 | 6f 77 20 69 6e 20 61 20 |the wind|ow in a |
|00002c80| 66 65 77 20 6d 6f 72 65 | 20 70 69 78 65 6c 73 20 |few more| pixels |
|00002c90| 66 72 6f 6d 20 74 68 65 | 20 65 64 67 65 20 6f 66 |from the| edge of|
|00002ca0| 20 74 68 65 20 73 63 72 | 65 65 6e 2e 0d 09 09 09 | the scr|een.....|
|00002cb0| 69 66 20 28 6f 66 66 73 | 65 74 41 6d 6f 75 6e 74 |if (offs|etAmount|
|00002cc0| 20 21 3d 20 30 29 0d 09 | 09 09 09 6f 66 66 73 65 | != 0)..|...offse|
|00002cd0| 74 41 6d 6f 75 6e 74 20 | 2b 3d 20 6b 4e 75 64 67 |tAmount |+= kNudg|
|00002ce0| 65 53 6c 6f 70 3b 0d 09 | 09 09 0d 09 09 09 2f 2f |eSlop;..|......//|
|00002cf0| 20 43 68 65 63 6b 20 74 | 6f 20 73 65 65 20 77 68 | Check t|o see wh|
|00002d00| 69 63 68 20 73 69 64 65 | 20 6f 66 20 74 68 65 20 |ich side| of the |
|00002d10| 73 63 72 65 65 6e 20 74 | 68 65 20 77 69 6e 64 6f |screen t|he windo|
|00002d20| 77 20 77 61 73 20 66 61 | 6c 6c 69 6e 67 20 6f 66 |w was fa|lling of|
|00002d30| 66 20 6f 66 2c 20 73 6f | 20 74 68 61 74 20 69 74 |f of, so| that it|
|00002d40| 20 63 61 6e 20 62 65 0d | 09 09 09 2f 2f 20 6e 75 | can be.|...// nu|
|00002d50| 64 67 65 64 20 69 6e 20 | 74 68 65 20 6f 70 70 6f |dged in |the oppo|
|00002d60| 73 69 74 65 20 64 69 72 | 65 63 74 69 6f 6e 2e 0d |site dir|ection..|
|00002d70| 09 09 09 69 66 20 28 69 | 64 65 61 6c 45 6e 64 50 |...if (i|dealEndP|
|00002d80| 6f 69 6e 74 20 3e 20 73 | 63 72 65 65 6e 45 64 67 |oint > s|creenEdg|
|00002d90| 65 32 29 0d 09 09 09 09 | 6f 66 66 73 65 74 41 6d |e2).....|offsetAm|
|00002da0| 6f 75 6e 74 20 3d 20 2d | 6f 66 66 73 65 74 41 6d |ount = -|offsetAm|
|00002db0| 6f 75 6e 74 3b 0d 09 09 | 7d 0d 09 7d 0d 09 0d 09 |ount;...|}..}....|
|00002dc0| 72 65 74 75 72 6e 20 6f | 66 66 73 65 74 41 6d 6f |return o|ffsetAmo|
|00002dd0| 75 6e 74 3b 0d 7d 0d 0d | 2f 2a 0d 09 57 69 6e 64 |unt;.}..|/*..Wind|
|00002de0| 6f 77 52 65 63 6f 72 64 | 20 61 63 63 65 73 73 6f |owRecord| accesso|
|00002df0| 72 20 66 75 6e 63 74 69 | 6f 6e 73 0d 2a 2f 0d 0d |r functi|ons.*/..|
|00002e00| 52 67 6e 48 61 6e 64 6c | 65 20 47 65 74 57 69 6e |RgnHandl|e GetWin|
|00002e10| 64 6f 77 43 6f 6e 74 65 | 6e 74 52 65 67 69 6f 6e |dowConte|ntRegion|
|00002e20| 28 57 69 6e 64 6f 77 50 | 65 65 6b 20 74 68 65 57 |(WindowP|eek theW|
|00002e30| 69 6e 64 6f 77 29 0d 7b | 0d 09 72 65 74 75 72 6e |indow).{|..return|
|00002e40| 20 28 74 68 65 57 69 6e | 64 6f 77 2d 3e 63 6f 6e | (theWin|dow->con|
|00002e50| 74 52 67 6e 29 3b 0d 7d | 0d 0d 52 67 6e 48 61 6e |tRgn);.}|..RgnHan|
|00002e60| 64 6c 65 20 47 65 74 57 | 69 6e 64 6f 77 53 74 72 |dle GetW|indowStr|
|00002e70| 75 63 74 75 72 65 52 65 | 67 69 6f 6e 28 57 69 6e |uctureRe|gion(Win|
|00002e80| 64 6f 77 50 65 65 6b 20 | 74 68 65 57 69 6e 64 6f |dowPeek |theWindo|
|00002e90| 77 29 0d 7b 0d 09 72 65 | 74 75 72 6e 20 28 74 68 |w).{..re|turn (th|
|00002ea0| 65 57 69 6e 64 6f 77 2d | 3e 73 74 72 75 63 52 67 |eWindow-|>strucRg|
|00002eb0| 6e 29 3b 0d 7d 0d 0d 76 | 6f 69 64 20 47 65 74 57 |n);.}..v|oid GetW|
|00002ec0| 69 6e 64 6f 77 50 6f 72 | 74 52 65 63 74 28 57 69 |indowPor|tRect(Wi|
|00002ed0| 6e 64 6f 77 50 65 65 6b | 20 74 68 65 57 69 6e 64 |ndowPeek| theWind|
|00002ee0| 6f 77 2c 20 52 65 63 74 | 20 2a 70 6f 72 74 52 65 |ow, Rect| *portRe|
|00002ef0| 63 74 29 0d 7b 0d 09 2a | 70 6f 72 74 52 65 63 74 |ct).{..*|portRect|
|00002f00| 20 3d 20 74 68 65 57 69 | 6e 64 6f 77 2d 3e 70 6f | = theWi|ndow->po|
|00002f10| 72 74 2e 70 6f 72 74 52 | 65 63 74 3b 0d 7d 0d 0d |rt.portR|ect;.}..|
|00002f20| 76 6f 69 64 20 53 65 74 | 57 69 6e 64 6f 77 53 74 |void Set|WindowSt|
|00002f30| 61 6e 64 61 72 64 53 74 | 61 74 65 28 57 69 6e 64 |andardSt|ate(Wind|
|00002f40| 6f 77 50 65 65 6b 20 74 | 68 65 57 69 6e 64 6f 77 |owPeek t|heWindow|
|00002f50| 2c 20 63 6f 6e 73 74 20 | 52 65 63 74 20 2a 73 74 |, const |Rect *st|
|00002f60| 61 6e 64 61 72 64 53 74 | 61 74 65 29 0d 7b 0d 09 |andardSt|ate).{..|
|00002f70| 28 2a 2a 28 28 57 53 74 | 61 74 65 44 61 74 61 48 |(**((WSt|ateDataH|
|00002f80| 61 6e 64 6c 65 29 20 74 | 68 65 57 69 6e 64 6f 77 |andle) t|heWindow|
|00002f90| 2d 3e 64 61 74 61 48 61 | 6e 64 6c 65 29 29 2e 73 |->dataHa|ndle)).s|
|00002fa0| 74 64 53 74 61 74 65 20 | 3d 20 2a 73 74 61 6e 64 |tdState |= *stand|
|00002fb0| 61 72 64 53 74 61 74 65 | 3b 0d 7d 0d 0d 76 6f 69 |ardState|;.}..voi|
|00002fc0| 64 20 47 65 74 57 69 6e | 64 6f 77 55 73 65 72 53 |d GetWin|dowUserS|
|00002fd0| 74 61 74 65 28 57 69 6e | 64 6f 77 50 65 65 6b 20 |tate(Win|dowPeek |
|00002fe0| 74 68 65 57 69 6e 64 6f | 77 2c 20 52 65 63 74 20 |theWindo|w, Rect |
|00002ff0| 2a 75 73 65 72 53 74 61 | 74 65 29 0d 7b 0d 09 2a |*userSta|te).{..*|
|00003000| 75 73 65 72 53 74 61 74 | 65 20 3d 20 28 2a 2a 28 |userStat|e = (**(|
|00003010| 28 57 53 74 61 74 65 44 | 61 74 61 48 61 6e 64 6c |(WStateD|ataHandl|
|00003020| 65 29 20 74 68 65 57 69 | 6e 64 6f 77 2d 3e 64 61 |e) theWi|ndow->da|
|00003030| 74 61 48 61 6e 64 6c 65 | 29 29 2e 75 73 65 72 53 |taHandle|)).userS|
|00003040| 74 61 74 65 3b 0d 7d 0d | 00 00 00 00 00 00 00 00 |tate;.}.|........|
|00003050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003060| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003070| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003080| 00 00 01 00 00 00 01 76 | 00 00 00 76 00 00 00 52 |.......v|...v...R|
|00003090| 00 00 01 b9 0f 43 20 52 | 65 6c 65 61 73 65 20 4e |.....C R|elease N|
|000030a0| 6f 74 65 73 00 00 00 00 | 00 00 00 00 00 00 00 00 |otes....|........|
|000030b0| 0a 5a 6f 6f 6d 43 6f 64 | 65 2e 63 00 02 00 00 00 |.ZoomCod|e.c.....|
|000030c0| 54 45 58 54 4d 50 53 20 | 01 00 ff ff ff ff 00 00 |TEXTMPS |........|
|000030d0| 00 00 54 45 58 54 4d 50 | 53 20 01 00 ff ff ff ff |..TEXTMP|S ......|
|000030e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000030f0| 00 00 a7 77 22 52 00 00 | 2f c8 00 00 01 c8 2e 68 |...w"R..|/......h|
|00003100| 00 00 00 00 00 00 00 00 | 00 00 00 87 25 00 00 00 |........|....%...|
|00003110| 01 b9 06 44 44 45 56 2e | 68 00 00 00 00 00 00 00 |...DDEV.|h.......|
|00003120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003130| 00 00 00 00 06 fb 25 00 | 00 00 01 b9 11 45 64 69 |......%.|.....Edi|
|00003140| 74 69 6f 6e 73 50 72 69 | 76 61 74 65 2e 68 00 00 |tionsPri|vate.h..|
|00003150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 88 |........|........|
|00003160| 25 00 00 00 01 b9 19 46 | 69 6c 65 54 72 61 6e 73 |%......F|ileTrans|
|00003170| 66 65 72 73 45 78 74 65 | 6e 73 69 6f 6e 73 2e 68 |fersExte|nsions.h|
|00003180| 00 00 00 04 00 01 00 01 | 00 00 00 48 00 09 4d 6f |........|...H..Mo|
|00003190| 6e 61 63 6f 00 00 00 00 | 00 bc 1b 70 00 00 00 00 |naco....|...p....|
|000031a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 06 |........|........|
|000031b0| 00 04 00 3c 00 24 01 dd | 02 3d 00 3c 00 24 01 dd |...<.$..|.=.<.$..|
|000031c0| 02 3d ab 87 77 56 00 00 | 00 7c 00 00 00 7c 00 00 |.=..wV..|.|...|..|
|000031d0| 26 6a 01 00 00 00 00 1e | 00 3c 00 24 01 dd 02 3d |&j......|.<.$...=|
|000031e0| 00 3c 00 24 01 dd 02 3d | 00 00 26 6a 00 00 00 00 |.<.$...=|..&j....|
|000031f0| 00 00 00 00 00 00 00 00 | 01 00 00 00 01 76 00 00 |........|.....v..|
|00003200| 00 76 00 00 00 52 00 b1 | f9 08 24 ba 00 00 00 1c |.v...R..|..$.....|
|00003210| 00 52 00 01 4d 50 53 52 | 00 01 00 12 4d 57 42 42 |.R..MPSR|....MWBB|
|00003220| 00 00 00 2a 03 ed ff ff | 00 00 00 08 00 00 00 00 |...*....|........|
|00003230| 03 f0 ff ff 00 00 00 54 | 00 b4 53 38 03 f0 ff ff |.......T|..S8....|
|00003240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003260| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003270| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+